invalid variable name error on hadoop-functions.sh file on manjaro

652 Views Asked by At

when ı run this code hadoop version, ı get this error

/usr/lib/hadoop-3.3.1/bin/../libexec/hadoop-functions.sh: line 2386: HADOOP_VERSİON_USER: invalid variable name
/usr/lib/hadoop-3.3.1/bin/../libexec/hadoop-functions.sh: line 2489: HADOOP_VERSİON_OPTS: invalid variable name
Hadoop 3.3.1
Source code repository https://github.com/apache/hadoop.git -r a3b9c37a397ad4188041dd80621bdeefc46885f2
Compiled by ubuntu on 2021-06-15T05:13Z
Compiled with protoc 3.7.1
From source with checksum 88a4ddb2299aca054416d6b7f81ca55
This command was run using /usr/lib/hadoop-3.3.1/share/hadoop/common/hadoop-common-3.3.1.jar

hadoop-functions.sh: line 2386

2384   uvar=$(hadoop_build_custom_subcmd_var "${program}" "${command}" USER)
2385
->2386   if [[ -n ${!uvar} ]]; then
2387     if [[ ${!uvar} !=  "${USER}" ]]; then
2388       hadoop_error "ERROR: ${command} can only be executed by ${!uvar}."
2389       exit 1
2390     fi
2391   fi
2392   return 0
2393 }

hadoop-functions.sh: line 2489

2478   # Let's handle all of the deprecation cases early
2479   # HADOOP_NAMENODE_OPTS -> HDFS_NAMENODE_OPTS
2480
2481   depvar="HADOOP_${ucommand}_OPTS"
2482
2483   if [[ "${depvar}" != "${uvar}" ]]; then
2484     if [[ -n "${!depvar}" ]]; then
2485       hadoop_deprecate_envvar "${depvar}" "${uvar}"
2486     fi
2487   fi
2488
->2489   if [[ -n ${!uvar} ]]; then
2490     hadoop_debug "Appending ${uvar} onto HADOOP_OPTS"
2491     HADOOP_OPTS="${HADOOP_OPTS} ${!uvar}"
2492     return 0
2493   fi
2494 }

what should ı do for solve 'invalid variable name' error?

0

There are 0 best solutions below