[GitHub] [carbondata] akashrn5 commented on a change in pull request #3941: [CARBONDATA-3998] Fixed file not found exception for hive during insert

2020-09-22 Thread GitBox


akashrn5 commented on a change in pull request #3941:
URL: https://github.com/apache/carbondata/pull/3941#discussion_r492488092



##
File path: 
integration/hive/src/main/java/org/apache/carbondata/hive/MapredCarbonInputFormat.java
##
@@ -158,7 +158,9 @@ private static CarbonTable getCarbonTable(Configuration 
configuration, String pa
 try {
   splitList = carbonInputFormat.getSplits(jobContext);
 } catch (IOException ex) {
-  if (ex.getMessage().contains("No Index files are present in the table 
location :")) {
+  LOGGER.error("Unable to get splits: ", ex);
+  if (ex.getMessage().contains("No Index files are present in the table 
location :") ||

Review comment:
   can you add UT for these, so that later if anyone changes message, they 
should take care here.

##
File path: 
integration/hive/src/main/java/org/apache/carbondata/hive/MapredCarbonInputFormat.java
##
@@ -158,7 +158,9 @@ private static CarbonTable getCarbonTable(Configuration 
configuration, String pa
 try {
   splitList = carbonInputFormat.getSplits(jobContext);
 } catch (IOException ex) {
-  if (ex.getMessage().contains("No Index files are present in the table 
location :")) {
+  LOGGER.error("Unable to get splits: ", ex);
+  if (ex.getMessage().contains("No Index files are present in the table 
location :") ||
+  ex.getMessage().contains("CarbonData file is not present in the 
table location")) {

Review comment:
   As i can see from code, `CarbonData file is not present in the table 
location` is a FIleNotFoundException message, not IO, so this condition will be 
always false?
   





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [carbondata] akashrn5 commented on a change in pull request #3941: [CARBONDATA-3998] Fixed file not found exception for hive during insert

2020-09-21 Thread GitBox


akashrn5 commented on a change in pull request #3941:
URL: https://github.com/apache/carbondata/pull/3941#discussion_r492504326



##
File path: 
integration/hive/src/main/java/org/apache/carbondata/hive/MapredCarbonInputFormat.java
##
@@ -158,7 +158,9 @@ private static CarbonTable getCarbonTable(Configuration 
configuration, String pa
 try {
   splitList = carbonInputFormat.getSplits(jobContext);
 } catch (IOException ex) {
-  if (ex.getMessage().contains("No Index files are present in the table 
location :")) {
+  LOGGER.error("Unable to get splits: ", ex);
+  if (ex.getMessage().contains("No Index files are present in the table 
location :") ||
+  ex.getMessage().contains("CarbonData file is not present in the 
table location")) {

Review comment:
   As i can see from code, `CarbonData file is not present in the table 
location` is a FIleNotFoundException message, not IO, so this condition will be 
always false?
   





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [carbondata] akashrn5 commented on a change in pull request #3941: [CARBONDATA-3998] Fixed file not found exception for hive during insert

2020-09-21 Thread GitBox


akashrn5 commented on a change in pull request #3941:
URL: https://github.com/apache/carbondata/pull/3941#discussion_r492488092



##
File path: 
integration/hive/src/main/java/org/apache/carbondata/hive/MapredCarbonInputFormat.java
##
@@ -158,7 +158,9 @@ private static CarbonTable getCarbonTable(Configuration 
configuration, String pa
 try {
   splitList = carbonInputFormat.getSplits(jobContext);
 } catch (IOException ex) {
-  if (ex.getMessage().contains("No Index files are present in the table 
location :")) {
+  LOGGER.error("Unable to get splits: ", ex);
+  if (ex.getMessage().contains("No Index files are present in the table 
location :") ||

Review comment:
   can you add UT for these, so that later if anyone changes message, they 
should take care here.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org