carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipes...@apache.org
Subject [11/20] incubator-carbondata git commit: [CARBONDATA-135] Fixed multiple hdfs client creation issue-Query scan flow (#902)
Date Sat, 06 Aug 2016 10:00:28 GMT
[CARBONDATA-135] Fixed multiple hdfs client creation issue-Query scan flow (#902)



Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/75ddcceb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/75ddcceb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/75ddcceb

Branch: refs/heads/master
Commit: 75ddcceb7bf6e681dd63c0bd082aeaeb6dd7388a
Parents: b4ae2eb
Author: Kumar Vishal <kumarvishal.1802@gmail.com>
Authored: Thu Aug 4 13:03:38 2016 +0530
Committer: Venkata Ramana G <g.ramana.v1@gmail.com>
Committed: Thu Aug 4 13:03:38 2016 +0530

----------------------------------------------------------------------
 .../core/datastorage/store/impl/DFSFileHolderImpl.java         | 4 ++--
 .../carbondata/core/datastorage/store/impl/FileFactory.java    | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/75ddcceb/core/src/main/java/org/carbondata/core/datastorage/store/impl/DFSFileHolderImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/core/datastorage/store/impl/DFSFileHolderImpl.java
b/core/src/main/java/org/carbondata/core/datastorage/store/impl/DFSFileHolderImpl.java
index 653c243..2ffdb5a 100644
--- a/core/src/main/java/org/carbondata/core/datastorage/store/impl/DFSFileHolderImpl.java
+++ b/core/src/main/java/org/carbondata/core/datastorage/store/impl/DFSFileHolderImpl.java
@@ -28,11 +28,11 @@ import org.carbondata.common.logging.LogServiceFactory;
 import org.carbondata.core.constants.CarbonCommonConstants;
 import org.carbondata.core.datastorage.store.FileHolder;
 
-import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 
+
 public class DFSFileHolderImpl implements FileHolder {
 
   private static final LogService LOGGER =
@@ -66,7 +66,7 @@ public class DFSFileHolderImpl implements FileHolder {
     try {
       if (null == fileChannel) {
         Path pt = new Path(filePath);
-        FileSystem fs = pt.getFileSystem(new Configuration());
+        FileSystem fs = FileSystem.get(FileFactory.getConfiguration());
         fileChannel = fs.open(pt);
         fileNameAndStreamCache.put(filePath, fileChannel);
       }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/75ddcceb/core/src/main/java/org/carbondata/core/datastorage/store/impl/FileFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/core/datastorage/store/impl/FileFactory.java
b/core/src/main/java/org/carbondata/core/datastorage/store/impl/FileFactory.java
index c88ade8..8005102 100644
--- a/core/src/main/java/org/carbondata/core/datastorage/store/impl/FileFactory.java
+++ b/core/src/main/java/org/carbondata/core/datastorage/store/impl/FileFactory.java
@@ -124,7 +124,7 @@ public final class FileFactory {
       case HDFS:
       case VIEWFS:
         Path pt = new Path(path);
-        FileSystem fs = pt.getFileSystem(configuration);
+        FileSystem fs = FileSystem.get(configuration);
         FSDataInputStream stream = fs.open(pt);
         return new DataInputStream(new BufferedInputStream(stream));
       default:
@@ -141,7 +141,7 @@ public final class FileFactory {
       case HDFS:
       case VIEWFS:
         Path pt = new Path(path);
-        FileSystem fs = pt.getFileSystem(configuration);
+        FileSystem fs = FileSystem.get(configuration);
         FSDataInputStream stream = fs.open(pt, bufferSize);
         return new DataInputStream(new BufferedInputStream(stream));
       default:
@@ -166,7 +166,7 @@ public final class FileFactory {
       case HDFS:
       case VIEWFS:
         Path pt = new Path(path);
-        FileSystem fs = pt.getFileSystem(configuration);
+        FileSystem fs = FileSystem.get(configuration);
         FSDataInputStream stream = fs.open(pt, bufferSize);
         stream.seek(offset);
         return new DataInputStream(new BufferedInputStream(stream));


Mime
View raw message