Tuesday, August 18, 2015

Error messages do lie..

Probably this is a trivial error. But when I was trying to deploy a file from the local file system to Hive, it was always giving the below error.

It was clear to me that the files indeed exists in the location /home/ec2-user/datacafe/. However, finally I realized that this is because that Hive client was unable to look beyond the hadoop directory. That means, when I moved the files to /home/hadoop/datacafe, and pointed to them, Hive easily found them! Here /home/hadoop was the installation directory. So this is rather a simple permission issue than a more complicated issue I expected it to be.


21:19:09.380 [main] INFO  edu.emory.bmi.datacafe.hdfs.HiveConnector - Successfully written the output to the file, patients.csv
21:19:09.874 [main] ERROR edu.emory.bmi.datacafe.hdfs.HiveConnector - SQL Exception in writing to Hive Table: patients
org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException Line 1:23 Invalid path ''../ec2-user/datacafe/patients.csv'': No files matching path file:/home/ec2-user/datacafe/patients.csv
    at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:231) ~[hive-jdbc-1.0.0.jar:1.0.0]
    at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:217) ~[hive-jdbc-1.0.0.jar:1.0.0]
    at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:254) ~[hive-jdbc-1.0.0.jar:1.0.0]
    at edu.emory.bmi.datacafe.hdfs.HiveConnector.writeToHive(HiveConnector.java:119) ~[datacafe-server-1.0-SNAPSHOT.jar:?]
    at edu.emory.bmi.datacafe.hdfs.HiveConnector.writeToWarehouse(HiveConnector.java:60) [datacafe-server-1.0-SNAPSHOT.jar:?]
    at edu.emory.bmi.datacafe.hdfs.HiveConnector.writeDataSourcesToWarehouse(HiveConnector.java:50) [datacafe-server-1.0-SNAPSHOT.jar:?]
    at edu.emory.bmi.datacafe.impl.main.Initiator.initiate(Initiator.java:71) [datacafe-server-1.0-SNAPSHOT.jar:?]
    at edu.emory.bmi.datacafe.impl.main.Initiator.main(Initiator.java:39) [datacafe-server-1.0-SNAPSHOT.jar:?]
21:19:09.881 [main] INFO  edu.emory.bmi.datacafe.hdfs.HiveConnector - Successfully written the output to the file, slices.csv
21:19:10.097 [main] ERROR edu.emory.bmi.datacafe.hdfs.HiveConnector - SQL Exception in writing to Hive Table: slices
org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException Line 1:23 Invalid path ''../ec2-user/datacafe/slices.csv'': No files matching path file:/home/ec2-user/datacafe/slices.csv
    at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:231) ~[hive-jdbc-1.0.0.jar:1.0.0]
    at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:217) ~[hive-jdbc-1.0.0.jar:1.0.0]
    at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:254) ~[hive-jdbc-1.0.0.jar:1.0.0]
    at edu.emory.bmi.datacafe.hdfs.HiveConnector.writeToHive(HiveConnector.java:119) ~[datacafe-server-1.0-SNAPSHOT.jar:?]
    at edu.emory.bmi.datacafe.hdfs.HiveConnector.writeToWarehouse(HiveConnector.java:60) [datacafe-server-1.0-SNAPSHOT.jar:?]
    at edu.emory.bmi.datacafe.hdfs.HiveConnector.writeDataSourcesToWarehouse(HiveConnector.java:50) [datacafe-server-1.0-SNAPSHOT.jar:?]
    at edu.emory.bmi.datacafe.impl.main.Initiator.initiate(Initiator.java:71) [datacafe-server-1.0-SNAPSHOT.jar:?]
    at edu.emory.bmi.datacafe.impl.main.Initiator.main(Initiator.java:39) [datacafe-server-1.0-SNAPSHOT.jar:?]

No comments:

Post a Comment

You are welcome to provide your opinions in the comments. Spam comments and comments with random links will be deleted.