kumarvishal09 commented on a change in pull request #3281: [WIP]Index server 
performance improvement
URL: https://github.com/apache/carbondata/pull/3281#discussion_r293677580
 
 

 ##########
 File path: 
core/src/main/java/org/apache/carbondata/core/indexstore/ExtendedBlocklet.java
 ##########
 @@ -161,40 +163,30 @@ public void setColumnSchema(List<ColumnSchema> 
columnSchema) {
       out.writeUTF(dataMapUniqueId);
     }
     if (inputSplit != null) {
-      out.writeBoolean(true);
-      inputSplit.write(out);
-      String[] locations = getLocations();
-      if (locations != null) {
-        out.writeBoolean(true);
-        out.writeInt(locations.length);
-        for (String location : locations) {
-          out.writeUTF(location);
-        }
-      } else {
-        out.writeBoolean(false);
+      ExtendedByteArrayOutputStream ebos = new ExtendedByteArrayOutputStream();
+      DataOutputStream dos = new DataOutputStream(ebos);
+      if (inputSplit.isBlockCache()) {
+        inputSplit.updateFooteroffset();
+        inputSplit.setWriteDetailInfo(false);
       }
-    } else {
-      out.writeBoolean(false);
+      inputSplit.serializeFields(dos, uniqueLocation);
+      out.writeInt(ebos.size());
+      out.write(ebos.getBuffer());
     }
   }
 
-  @Override public void readFields(DataInput in) throws IOException {
+  public void deserializeFields(DataInput in, String[] locations, String 
tablePath)
+      throws IOException {
     super.readFields(in);
     if (in.readBoolean()) {
       dataMapUniqueId = in.readUTF();
     }
-    if (in.readBoolean()) {
-      inputSplit = new CarbonInputSplit();
-      inputSplit.readFields(in);
-      if (in.readBoolean()) {
-        int numLocations = in.readInt();
-        String[] locations = new String[numLocations];
-        for (int i = 0; i < numLocations; i++) {
-          locations[i] = in.readUTF();
-        }
-        inputSplit.setLocation(locations);
-      }
+    setFilePath(tablePath + getPath());
+    boolean isSplitPresent = in.readBoolean();
 
 Review comment:
   fixed

----------------------------------------------------------------
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