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

 ##########
 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:
   There are several methods in CarbonUtil which are handling the exceptions or 
are used to pass common values to FileFactory...so i think its better to leave 
them as it is and they can be refactored some time later.

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


With regards,
Apache Git Services

Reply via email to