From a3df6dd38f13d4da85e86ba38ec72a4994b6af13 Mon Sep 17 00:00:00 2001 From: Eric Yang Date: Wed, 5 Oct 2011 00:37:24 +0000 Subject: [PATCH] HADOOP-7720. Added parameter for HBase user to setup config script. (Arpit Gupta via Eric Yang) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1179025 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../hadoop-common/src/main/packages/hadoop-setup-conf.sh | 9 +++++++++ .../src/main/packages/templates/conf/core-site.xml | 2 ++ 3 files changed, 14 insertions(+) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index c7e30d530f..ce18e29dd1 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -424,6 +424,9 @@ Release 0.23.0 - Unreleased HADOOP-7707. Added toggle for dfs.support.append, webhdfs and hadoop proxy user to setup config script. (Arpit Gupta via Eric Yang) + HADOOP-7720. Added parameter for HBase user to setup config script. + (Arpit Gupta via Eric Yang) + OPTIMIZATIONS HADOOP-7333. Performance improvement in PureJavaCrc32. (Eric Caspole diff --git a/hadoop-common-project/hadoop-common/src/main/packages/hadoop-setup-conf.sh b/hadoop-common-project/hadoop-common/src/main/packages/hadoop-setup-conf.sh index 0d73a7fccc..8d54b2e41d 100644 --- a/hadoop-common-project/hadoop-common/src/main/packages/hadoop-setup-conf.sh +++ b/hadoop-common-project/hadoop-common/src/main/packages/hadoop-setup-conf.sh @@ -54,6 +54,7 @@ usage: $0 --dfs-webhdfs-enabled=false|true Enable webhdfs --dfs-support-append=false|true Enable append --hadoop-proxy-users='user1:groups:hosts;user2:groups:hosts' Setup proxy users for hadoop + --hbase-user=hbase User which hbase is running as. Defaults to hbase " exit 1 } @@ -196,6 +197,7 @@ OPTS=$(getopt \ -l 'dfs-webhdfs-enabled:' \ -l 'hadoop-proxy-users:' \ -l 'dfs-support-append:' \ + -l 'hbase-user:' \ -o 'h' \ -- "$@") @@ -327,6 +329,10 @@ while true ; do DFS_SUPPORT_APPEND=$2; shift 2 AUTOMATED=1 ;; + --hbase-user) + HBASE_USER=$2; shift 2 + AUTOMATED=1 + ;; --) shift ; break ;; @@ -355,6 +361,9 @@ HADOOP_REPLICATION=${HADOOP_RELICATION:-3} HADOOP_TASK_SCHEDULER=${HADOOP_TASK_SCHEDULER:-org.apache.hadoop.mapred.JobQueueTaskScheduler} HADOOP_HDFS_USER=${HADOOP_HDFS_USER:-hdfs} HADOOP_MR_USER=${HADOOP_MR_USER:-mr} +DFS_WEBHDFS_ENABLED=${DFS_WEBHDFS_ENABLED:-false} +DFS_SUPPORT_APPEND=${DFS_SUPPORT_APPEND:-false} +HBASE_USER=${HBASE_USER:-hbase} KEYTAB_DIR=${KEYTAB_DIR:-/etc/security/keytabs} HDFS_KEYTAB=${HDFS_KEYTAB:-/home/hdfs/hdfs.keytab} MR_KEYTAB=${MR_KEYTAB:-/home/mr/mr.keytab} diff --git a/hadoop-common-project/hadoop-common/src/main/packages/templates/conf/core-site.xml b/hadoop-common-project/hadoop-common/src/main/packages/templates/conf/core-site.xml index d2f040c535..9fac2258d1 100644 --- a/hadoop-common-project/hadoop-common/src/main/packages/templates/conf/core-site.xml +++ b/hadoop-common-project/hadoop-common/src/main/packages/templates/conf/core-site.xml @@ -58,6 +58,8 @@ RULE:[2:$1@$0](hdfs@.*${KERBEROS_REALM})s/.*/${HADOOP_HDFS_USER}/ RULE:[2:$1@$0](mapredqa@.*${KERBEROS_REALM})s/.*/${HADOOP_MR_USER}/ RULE:[2:$1@$0](hdfsqa@.*${KERBEROS_REALM})s/.*/${HADOOP_HDFS_USER}/ + RULE:[2:$1@$0](hm@.*${KERBEROS_REALM})s/.*/${HBASE_USER}/ + RULE:[2:$1@$0](rs@.*${KERBEROS_REALM})s/.*/${HBASE_USER}/ DEFAULT