You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by jl...@apache.org on 2020/09/29 00:05:30 UTC

[incubator-pinot] branch include-hadoop-dependencies created (now b0cac82)

This is an automated email from the ASF dual-hosted git repository.

jlli pushed a change to branch include-hadoop-dependencies
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git.


      at b0cac82  Add Hadoop related dependencies in pinot-tool module

This branch includes the following new commits:

     new b0cac82  Add Hadoop related dependencies in pinot-tool module

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[incubator-pinot] 01/01: Add Hadoop related dependencies in pinot-tool module

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jlli pushed a commit to branch include-hadoop-dependencies
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit b0cac822b1dd4bb637311de2e87b7d871193d889
Author: Jack Li(Analytics Engineering) <jl...@jlli-mn1.linkedin.biz>
AuthorDate: Mon Sep 28 17:05:06 2020 -0700

    Add Hadoop related dependencies in pinot-tool module
---
 .../apache/pinot/core/segment/memory/PinotByteBuffer.java | 15 ++++++++-------
 pinot-tools/pom.xml                                       | 10 ++++++++++
 2 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/pinot-core/src/main/java/org/apache/pinot/core/segment/memory/PinotByteBuffer.java b/pinot-core/src/main/java/org/apache/pinot/core/segment/memory/PinotByteBuffer.java
index 87d5feb..d1136f8 100644
--- a/pinot-core/src/main/java/org/apache/pinot/core/segment/memory/PinotByteBuffer.java
+++ b/pinot-core/src/main/java/org/apache/pinot/core/segment/memory/PinotByteBuffer.java
@@ -21,6 +21,7 @@ package org.apache.pinot.core.segment.memory;
 import java.io.File;
 import java.io.IOException;
 import java.io.RandomAccessFile;
+import java.nio.Buffer;
 import java.nio.ByteBuffer;
 import java.nio.ByteOrder;
 import java.nio.MappedByteBuffer;
@@ -231,7 +232,7 @@ public class PinotByteBuffer extends PinotDataBuffer {
       }
     } else {
       ByteBuffer duplicate = _buffer.duplicate();
-      duplicate.position(intOffset);
+      ((Buffer) duplicate).position(intOffset);
       duplicate.get(buffer, destOffset, size);
     }
   }
@@ -243,7 +244,7 @@ public class PinotByteBuffer extends PinotDataBuffer {
     int start = (int) offset;
     int end = start + (int) size;
     ByteBuffer duplicate = _buffer.duplicate();
-    duplicate.position(start).limit(end);
+    ((Buffer) duplicate).position(start).limit(end);
     buffer.readFrom(destOffset, duplicate);
   }
 
@@ -258,7 +259,7 @@ public class PinotByteBuffer extends PinotDataBuffer {
       }
     } else {
       ByteBuffer duplicate = _buffer.duplicate();
-      duplicate.position(intOffset);
+      ((Buffer) duplicate).position(intOffset);
       duplicate.put(buffer, srcOffset, size);
     }
   }
@@ -267,7 +268,7 @@ public class PinotByteBuffer extends PinotDataBuffer {
   public void readFrom(long offset, ByteBuffer buffer) {
     assert offset <= Integer.MAX_VALUE;
     ByteBuffer duplicate = _buffer.duplicate();
-    duplicate.position((int) offset);
+    ((Buffer) duplicate).position((int) offset);
     duplicate.put(buffer);
   }
 
@@ -280,7 +281,7 @@ public class PinotByteBuffer extends PinotDataBuffer {
       ByteBuffer duplicate = _buffer.duplicate();
       int start = (int) offset;
       int end = start + (int) size;
-      duplicate.position(start).limit(end);
+      ((Buffer) duplicate).position(start).limit(end);
       randomAccessFile.getChannel().read(duplicate, srcOffset);
     }
   }
@@ -300,7 +301,7 @@ public class PinotByteBuffer extends PinotDataBuffer {
     assert start <= end;
     assert end <= Integer.MAX_VALUE;
     ByteBuffer duplicate = _buffer.duplicate();
-    duplicate.position((int) start).limit((int) end);
+    ((Buffer) duplicate).position((int) start).limit((int) end);
     ByteBuffer buffer = duplicate.slice();
     buffer.order(byteOrder);
     return new PinotByteBuffer(buffer, false, false);
@@ -312,7 +313,7 @@ public class PinotByteBuffer extends PinotDataBuffer {
     int start = (int) offset;
     int end = start + size;
     ByteBuffer duplicate = _buffer.duplicate();
-    duplicate.position(start).limit(end);
+    ((Buffer) duplicate).position(start).limit(end);
     ByteBuffer buffer = duplicate.slice();
     buffer.order(byteOrder);
     return buffer;
diff --git a/pinot-tools/pom.xml b/pinot-tools/pom.xml
index 861f88a..17dae66 100644
--- a/pinot-tools/pom.xml
+++ b/pinot-tools/pom.xml
@@ -98,6 +98,16 @@
       <scope>runtime</scope>
     </dependency>
     <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-common</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-hdfs</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
       <groupId>commons-cli</groupId>
       <artifactId>commons-cli</artifactId>
     </dependency>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org