Home Forums Hive / HCatalog Hive Import Error: SemanticException Error 10028

Tagged: 

This topic contains 1 reply, has 1 voice, and was last updated by  Jeffrey 9 months ago.

  • Creator
    Topic
  • #46900

    Jeffrey
    Participant

    Using the following Java code:
    String driver = “com.microsoft.sqlserver.jdbc.SQLServerDriver”;
    Class.forName(driver).newInstance();
    SqoopOptions options = new SqoopOptions();
    options.setConnManagerClassName(“org.apache.sqoop.manager.GenericJdbcManager”);
    options.setDriverClassName(driver);
    options.setHadoopMapRedHome(“/usr/lib/hadoop-mapreduce”);
    options.setConnectString(“jdbc:sqlserver://sqlbox;databaseName=db;user=usr;password=pass”);
    options.setTableName(“Parameters”);
    options.setUsername(“usr”);
    options.setPassword(“pass”);
    options.setOverwriteHiveTable(true);
    options.setDirectMode(true);
    options.setNumMappers(1);
    options.setJobName(“Test Import”);
    options.setTargetDir(“/home/Tmp-Parameters”);
    options.setFileLayout(FileLayout.TextFile);
    options.setDirectMode(true);
    options.setHiveImport(true);
    options.setHiveDatabaseName(“default”);
    options.setHiveTableName(“Parameters”);
    options.setHiveHome(“/usr/lib/hive”);

    ImportTool tool = new ImportTool();
    int result = tool.run(options);
    System.out.println(new Integer(result));

    I am getting this error:
    FAILED: SemanticException [Error 10028]: Line 2:17 Path is not legal ”file:/home/Tmp-Parameters”: Move from: file:/home/Tmp-Parameters to: hdfs://sandbox.hortonworks.com:8020/apps/hive/warehouse/parameters is not valid. Please check that values for params “default.fs.name” and “hive.metastore.warehouse.dir” do not conflict.
    ERROR main org.apache.sqoop.tool.ImportTool – Encountered IOException running import job: java.io.IOException: Hive exited with status 44
    at org.apache.sqoop.hive.HiveImport.executeExternalHiveScript(HiveImport.java:385)
    at org.apache.sqoop.hive.HiveImport.executeScript(HiveImport.java:335)
    at org.apache.sqoop.hive.HiveImport.importTable(HiveImport.java:239)
    at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:425)
    at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:502)
    at SqlImport.importSQLToHDFS(SqlImport.java:52)
    at SqlImport.main(SqlImport.java:11)

    I am using Hortonworks Sandbox 2.0 – running this Java code directly on the Sandbox Virtual Machine.
    It gets way down to the end after pulling all of the data from our SQL Server and then throws out this error.
    Anyone know what is causing this?

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.

  • Author
    Replies
  • #47379

    Jeffrey
    Participant

    With Help from Eric Mizell @ Hortonworks, we finally got past this error.

    I was executing my Java class using the standard JVM. i.e. ‘java myclassname’

    I needed to export a JAR file from Eclipse and execute it like this:
    ‘hadoop jar myfile.jar myclassname’

    Collapse
Viewing 1 replies (of 1 total)