chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r773970 - in /hadoop/chukwa: branches/chukwa-0.1/build.xml branches/chukwa-0.1/default.properties branches/chukwa-0.1/tools/specs/chukwa.spec trunk/build.xml trunk/tools/specs/chukwa.spec
Date Tue, 12 May 2009 16:35:37 GMT
Author: eyang
Date: Tue May 12 16:35:36 2009
New Revision: 773970

URL: http://svn.apache.org/viewvc?rev=773970&view=rev
Log:
CHUKWA-228.  Added rpm.hdfsusage.uid option to run HDFS usage as a separate user. (Cheng Zhang
via Eric Yang)

Modified:
    hadoop/chukwa/branches/chukwa-0.1/build.xml
    hadoop/chukwa/branches/chukwa-0.1/default.properties
    hadoop/chukwa/branches/chukwa-0.1/tools/specs/chukwa.spec
    hadoop/chukwa/trunk/build.xml
    hadoop/chukwa/trunk/tools/specs/chukwa.spec

Modified: hadoop/chukwa/branches/chukwa-0.1/build.xml
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.1/build.xml?rev=773970&r1=773969&r2=773970&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.1/build.xml (original)
+++ hadoop/chukwa/branches/chukwa-0.1/build.xml Tue May 12 16:35:36 2009
@@ -1119,6 +1119,7 @@
 					<token key="rpm.prefix" value="${rpm.prefix}" />
 					<token key="rpm.conf.dir" value="${rpm.conf.dir}" />
 					<token key="rpm.uid" value="${rpm.uid}" />
+					<token key="rpm.hdfsusage.uid" value="${rpm.hdfsusage.uid}" />
 					<token key="rpm.gid" value="${rpm.gid}" />
 				</replacetokens>
 			</filterchain>

Modified: hadoop/chukwa/branches/chukwa-0.1/default.properties
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.1/default.properties?rev=773970&r1=773969&r2=773970&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.1/default.properties (original)
+++ hadoop/chukwa/branches/chukwa-0.1/default.properties Tue May 12 16:35:36 2009
@@ -16,6 +16,7 @@
 rpm.conf.dir=/usr/local/chukwa/conf
 hadoop.conf=/usr/local/hadoop
 rpm.uid=chukwa
+rpm.hdfsusage.uid=chukwa
 rpm.gid=users
 test.exclude=TestDatabase*
 CHUKWA_LOG_DIR=/usr/local/chukwa/var/log

Modified: hadoop/chukwa/branches/chukwa-0.1/tools/specs/chukwa.spec
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.1/tools/specs/chukwa.spec?rev=773970&r1=773969&r2=773970&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.1/tools/specs/chukwa.spec (original)
+++ hadoop/chukwa/branches/chukwa-0.1/tools/specs/chukwa.spec Tue May 12 16:35:36 2009
@@ -19,6 +19,7 @@
 %define _conf_dir       @rpm.conf.dir@
 %define uid             @rpm.uid@
 %define gid             @rpm.gid@
+%define hdfsusage_uid   @rpm.hdfsusage.uid@
 %define name            chukwa
 %define summary         Distributed Computing Monitoring Framework.
 %define version         @chukwaVersion@
@@ -49,6 +50,10 @@
 %prep
 %setup -q
 %build
+export hdfsusage_uid=%{hdfsusage_uid}
+if [ -z "${hdfsusage_uid}" ]; then
+    export hdfsusage_uid=%{uid}
+fi
 mkdir -p %{buildroot}%{_prefix}
 if [ -d %{buildroot}%{_prefix} ]; then
     rm -rf %{buildroot}%{_prefix}
@@ -138,7 +143,7 @@
 mv %{buildroot}%{_prefix}/tools/service/chukwa-torque/run.new %{buildroot}%{_prefix}/tools/service/chukwa-torque/run
 
 cat %{buildroot}%{_prefix}/tools/service/chukwa-hdfsusage/run | \
-sed 's:CHUKWA_USER=chukwa:CHUKWA_USER=%{uid}:' | \
+sed "s:CHUKWA_USER=chukwa:CHUKWA_USER=${hdfsusage_uid}:" | \
 sed 's:CHUKWA_HOME=/usr/local/chukwa:CHUKWA_HOME=%{_prefix}:' | \
 sed 's:CHUKWA_CONF_DIR=/usr/local/chukwa/conf:CHUKWA_CONF_DIR=%{_conf_dir}:' \
 > %{buildroot}%{_prefix}/tools/service/chukwa-hdfsusage/run.new

Modified: hadoop/chukwa/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/build.xml?rev=773970&r1=773969&r2=773970&view=diff
==============================================================================
--- hadoop/chukwa/trunk/build.xml (original)
+++ hadoop/chukwa/trunk/build.xml Tue May 12 16:35:36 2009
@@ -1119,6 +1119,7 @@
 					<token key="rpm.prefix" value="${rpm.prefix}" />
 					<token key="rpm.conf.dir" value="${rpm.conf.dir}" />
 					<token key="rpm.uid" value="${rpm.uid}" />
+					<token key="rpm.hdfsusage.uid" value="${rpm.hdfsusage.uid}" />
 					<token key="rpm.gid" value="${rpm.gid}" />
 				</replacetokens>
 			</filterchain>

Modified: hadoop/chukwa/trunk/tools/specs/chukwa.spec
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/tools/specs/chukwa.spec?rev=773970&r1=773969&r2=773970&view=diff
==============================================================================
--- hadoop/chukwa/trunk/tools/specs/chukwa.spec (original)
+++ hadoop/chukwa/trunk/tools/specs/chukwa.spec Tue May 12 16:35:36 2009
@@ -19,6 +19,7 @@
 %define _conf_dir       @rpm.conf.dir@
 %define uid             @rpm.uid@
 %define gid             @rpm.gid@
+%define hdfsusage_uid   @rpm.hdfsusage.uid@
 %define name            chukwa
 %define summary         Distributed Computing Monitoring Framework.
 %define version         @chukwaVersion@
@@ -49,6 +50,10 @@
 %prep
 %setup -q
 %build
+export hdfsusage_uid=%{hdfsusage_uid}
+if [ -z "${hdfsusage_uid}" ]; then
+    export hdfsusage_uid=%{uid}
+fi
 mkdir -p %{buildroot}%{_prefix}
 if [ -d %{buildroot}%{_prefix} ]; then
     rm -rf %{buildroot}%{_prefix}
@@ -138,7 +143,7 @@
 mv %{buildroot}%{_prefix}/tools/service/chukwa-torque/run.new %{buildroot}%{_prefix}/tools/service/chukwa-torque/run
 
 cat %{buildroot}%{_prefix}/tools/service/chukwa-hdfsusage/run | \
-sed 's:CHUKWA_USER=chukwa:CHUKWA_USER=%{uid}:' | \
+sed "s:CHUKWA_USER=chukwa:CHUKWA_USER=${hdfsusage_uid}:" | \
 sed 's:CHUKWA_HOME=/usr/local/chukwa:CHUKWA_HOME=%{_prefix}:' | \
 sed 's:CHUKWA_CONF_DIR=/usr/local/chukwa/conf:CHUKWA_CONF_DIR=%{_conf_dir}:' \
 > %{buildroot}%{_prefix}/tools/service/chukwa-hdfsusage/run.new



Mime
View raw message