6
hduser@kubuntu17:~$ sqoop version
/usr/local/hadoop/libexec/hadoop-functions.sh: line 2326: HADOOP_ORG.APACHE.SQOOP.SQOOP_USER: bad substitution
/usr/local/hadoop/libexec/hadoop-functions.sh: line 2421: HADOOP_ORG.APACHE.SQOOP.SQOOP_OPTS: bad substitution
2017-11-04 03:34:05,230 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6
Sqoop 1.4.6
git commit id c0c5a81723759fa575844a0a1eae8f510fa32c25
Compiled by root on Mon Apr 27 14:38:36 CST 2015
hduser@kubuntu17:~$ 

Why sqoop throws this error and how can it be fixed?

I have checked line 2326 in hadoop-functions.sh and the fucnction is:

function hadoop_verify_user_perm
{
  declare program=$1
  declare command=$2
  declare uvar

  uvar=$(hadoop_build_custom_subcmd_var "${program}" "${command}" USER)

  if [[ -n ${!uvar} ]]; then
    if [[ ${!uvar} !=  "${USER}" ]]; then
      hadoop_error "ERROR: ${command} can only be executed by ${!uvar}."
      exit 1
    fi
  fi
  return 0
}

Any thought on this is much appreciated.

snag05
  • 101
  • 6
  • What have you tried? Do you have any hypothesis? – Max von Hippel Nov 03 '17 at 22:32
  • 2
    Did google first, no similar case found. Next, by looking in to the two problem lines (sqoop version command result) opened hadoop_functions.sh and checked line numbers 2326 and 2421. Looks like "uvar" variable is the problem element but not sure how to go ahead to solve this. BTW, sqoop working fine, I can import data from MySql into Hive. – snag05 Nov 04 '17 at 06:11
  • What version of Hadoop do you have? Did you verify Sqoop supported it? – OneCricketeer Nov 04 '17 at 14:58
  • hduser@kubuntu17:~$ hadoop version Hadoop 3.0.0-beta1 Sqoop supports as I am able to run sqoop to import ata from MySql into Hive. – snag05 Nov 04 '17 at 19:09
  • 1
    Did you have find solution for this? – Bruno Wego Mar 14 '19 at 15:51
  • 2
    @BrunoWego this issue was fixed in https://issues.apache.org/jira/browse/HADOOP-16167. You can find the latest version at GitHub (https://github.com/apache/hadoop/blob/trunk/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh). – Nightly Coder Feb 20 '20 at 13:04

0 Answers0