[GitHub] [carbondata] jackylk commented on a change in pull request #2465: [CARBONDATA-2863] Refactored CarbonFile interface

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] jackylk commented on a change in pull request #2465: [CARBONDATA-2863] Refactored CarbonFile interface

GitBox
jackylk commented on a change in pull request #2465: [CARBONDATA-2863] Refactored CarbonFile interface
URL: https://github.com/apache/carbondata/pull/2465#discussion_r349921865
 
 

 ##########
 File path: core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AbstractDFSCarbonFile.java
 ##########
 @@ -273,71 +263,52 @@ public boolean isFileModified(long fileTimeStamp, long endOffset) {
   }
 
   @Override
-  public DataOutputStream getDataOutputStream(String path, FileFactory.FileType fileType,
-      int bufferSize, boolean append) throws IOException {
-    Path pt = new Path(path);
-    FileSystem fileSystem = pt.getFileSystem(FileFactory.getConfiguration());
+  public DataOutputStream getDataOutputStream(int bufferSize, boolean append)
+      throws IOException {
     FSDataOutputStream stream = null;
     if (append) {
       // append to a file only if file already exists else file not found
       // exception will be thrown by hdfs
-      if (CarbonUtil.isFileExists(path)) {
-        stream = fileSystem.append(pt, bufferSize);
+      if (CarbonUtil.isFileExists(path.toString())) {
 
 Review comment:
   Why not call `isFileExists` directly in `FileFactory`?

----------------------------------------------------------------
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:
[hidden email]


With regards,
Apache Git Services