Skip to content

Commit

Permalink
[CARBONDATA-3194] Integrating Carbon with Presto using hive connector
Browse files Browse the repository at this point in the history
This PR extend the CarbondataConnectorFactory with HiveConnectorFactory, so that all features of HIve presto connector will be inherited to carbon as well.
It simplifies the integration so removed lot of old code.

This closes #3019
  • Loading branch information
ravipesala authored and jackylk committed Dec 29, 2018
1 parent 7c4e79f commit e193df0
Show file tree
Hide file tree
Showing 28 changed files with 638 additions and 1,422 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,29 @@ public enum FileType {
LOCAL, HDFS, ALLUXIO, VIEWFS, S3
}

/**
* Adds the schema to file path if not exists to the file path.
* @param filePath path of file
* @return Updated filepath
*/
public static String addSchemeIfNotExists(String filePath) {
FileType fileType = getFileType(filePath);
switch (fileType) {
case LOCAL:
if (filePath.startsWith("file:")) {
return filePath;
} else {
return new Path("file://" + filePath).toString();
}
case HDFS:
case ALLUXIO:
case VIEWFS:
case S3:
default:
return filePath;
}
}

/**
* below method will be used to update the file path
* for local type
Expand Down
19 changes: 19 additions & 0 deletions integration/presto/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,25 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-hive</artifactId>
<version>${presto.version}</version>
<exclusions>
<exclusion>
<groupId>org.openjdk.jol</groupId>
<artifactId>jol-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit e193df0

Please sign in to comment.