Browse Source

HADOOP-11653. shellprofiles should require .sh extension (Brahma Reddy Battula via aw)

Allen Wittenauer 10 years ago
parent
commit
01bfe6f05b

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -414,6 +414,9 @@ Trunk (Unreleased)
 
     HADOOP-11602. Fix toUpperCase/toLowerCase to use Locale.ENGLISH. (ozawa)
 
+    HADOOP-11653. shellprofiles should require .sh extension
+    (Brahma Reddy Battula via aw)
+
   OPTIMIZATIONS
 
     HADOOP-7761. Improve the performance of raw comparisons. (todd)

+ 2 - 2
hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh

@@ -162,13 +162,13 @@ function hadoop_import_shellprofiles
   local files2
 
   if [[ -d "${HADOOP_LIBEXEC_DIR}/shellprofile.d" ]]; then
-    files1=(${HADOOP_LIBEXEC_DIR}/shellprofile.d/*)
+    files1=(${HADOOP_LIBEXEC_DIR}/shellprofile.d/*.sh)
   else
     hadoop_error "WARNING: ${HADOOP_LIBEXEC_DIR}/shellprofile.d doesn't exist. Functionality may not work."
   fi
 
   if [[ -d "${HADOOP_CONF_DIR}/shellprofile.d" ]]; then
-    files2=(${HADOOP_CONF_DIR}/shellprofile.d/*)
+    files2=(${HADOOP_CONF_DIR}/shellprofile.d/*.sh)
   fi
 
   for i in "${files1[@]}" "${files2[@]}"

+ 0 - 0
hadoop-common-project/hadoop-common/src/main/conf/shellprofile.d/example → hadoop-common-project/hadoop-common/src/main/conf/shellprofile.d/example.sh


+ 0 - 0
hadoop-hdfs-project/hadoop-hdfs/src/main/shellprofile.d/hdfs → hadoop-hdfs-project/hadoop-hdfs/src/main/shellprofile.d/hdfs.sh


+ 0 - 0
hadoop-mapreduce-project/shellprofile.d/mapreduce → hadoop-mapreduce-project/shellprofile.d/mapreduce.sh


+ 0 - 0
hadoop-yarn-project/hadoop-yarn/shellprofile.d/yarn → hadoop-yarn-project/hadoop-yarn/shellprofile.d/yarn.sh