You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/01/16 00:15:04 UTC

[GitHub] [incubator-hudi] nbalajee opened a new pull request #1233: [HUDI-335] Improvements to DiskBasedMap used by ExternalSpillableMap,…

nbalajee opened a new pull request #1233: [HUDI-335] Improvements to DiskBasedMap used by ExternalSpillableMap,…
URL: https://github.com/apache/incubator-hudi/pull/1233
 
 
   [HUDI-335] Improvements to DiskBasedMap used by ExternalSpillableMap, for write and random/sequential read paths, by introducing bufferedRandmomAccessFile
   
   ## What is the purpose of the pull request
   DiskBasedMap is used by ExternalSpillableMap for writing (K,V) pair to a file,
   keeping the (K, fileMetadata) in memory, to reduce the foot print of the record on disk.
   
   This change improves the performance of the record get/read (random read/sequential read) and put/write operations from/to disk, by introducing a data buffer/cache.
   
   ## Brief change log
   Using BufferedRandomAccessFile instead of RandomAccessFile, in read path.
   Using BufferedOutputStream in the write path.
   
   ## Verify this pull request
   This pull request is covered by existing tests, such as TestDiskBasedMap:testSimpleInsert
   
   
   ## Committer checklist
   
    - [ x] Has a corresponding JIRA in PR title & commit
    
    - [x ] Commit message is descriptive of the change
    
    - [ x] CI is green
   
    - [ ] Necessary doc changes done or have another open PR
          
    - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-hudi] vinothchandar commented on a change in pull request #1233: [HUDI-335] Improvements to DiskBasedMap used by ExternalSpillableMap,…

Posted by GitBox <gi...@apache.org>.
vinothchandar commented on a change in pull request #1233: [HUDI-335] Improvements to DiskBasedMap used by ExternalSpillableMap,…
URL: https://github.com/apache/incubator-hudi/pull/1233#discussion_r368751754
 
 

 ##########
 File path: hudi-common/src/main/java/org/apache/hudi/common/util/BufferedRandomAccessFile.java
 ##########
 @@ -0,0 +1,411 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.util;
+
+import org.apache.log4j.Logger;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.nio.ByteBuffer;
+
+/**
+ * Use a private buffer for the read/write/seek operations of the RandomAccessFile
 
 Review comment:
   Thanks! 
   @bvaradar @n3nash should we then back out the license change.. I am confused. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-hudi] nbalajee commented on a change in pull request #1233: [HUDI-335] Improvements to DiskBasedMap used by ExternalSpillableMap,…

Posted by GitBox <gi...@apache.org>.
nbalajee commented on a change in pull request #1233: [HUDI-335] Improvements to DiskBasedMap used by ExternalSpillableMap,…
URL: https://github.com/apache/incubator-hudi/pull/1233#discussion_r368729156
 
 

 ##########
 File path: hudi-common/src/main/java/org/apache/hudi/common/util/BufferedRandomAccessFile.java
 ##########
 @@ -0,0 +1,411 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.util;
+
+import org.apache.log4j.Logger;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.nio.ByteBuffer;
+
+/**
+ * Use a private buffer for the read/write/seek operations of the RandomAccessFile
 
 Review comment:
   Yes Vinoth.  This is our own implementation of BufferedRandomAccessFile.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-hudi] vinothchandar commented on a change in pull request #1233: [HUDI-335] Improvements to DiskBasedMap used by ExternalSpillableMap,…

Posted by GitBox <gi...@apache.org>.
vinothchandar commented on a change in pull request #1233: [HUDI-335] Improvements to DiskBasedMap used by ExternalSpillableMap,…
URL: https://github.com/apache/incubator-hudi/pull/1233#discussion_r368238975
 
 

 ##########
 File path: hudi-common/src/main/java/org/apache/hudi/common/util/BufferedRandomAccessFile.java
 ##########
 @@ -0,0 +1,411 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.util;
+
+import org.apache.log4j.Logger;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.nio.ByteBuffer;
+
+/**
+ * Use a private buffer for the read/write/seek operations of the RandomAccessFile
 
 Review comment:
   @n3nash @nbalajee is this our own implementation? 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-hudi] n3nash merged pull request #1233: [HUDI-335] Improvements to DiskBasedMap used by ExternalSpillableMap,…

Posted by GitBox <gi...@apache.org>.
n3nash merged pull request #1233: [HUDI-335] Improvements to DiskBasedMap used by ExternalSpillableMap,…
URL: https://github.com/apache/incubator-hudi/pull/1233
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-hudi] bvaradar commented on a change in pull request #1233: [HUDI-335] Improvements to DiskBasedMap used by ExternalSpillableMap,…

Posted by GitBox <gi...@apache.org>.
bvaradar commented on a change in pull request #1233: [HUDI-335] Improvements to DiskBasedMap used by ExternalSpillableMap,…
URL: https://github.com/apache/incubator-hudi/pull/1233#discussion_r368775609
 
 

 ##########
 File path: hudi-common/src/main/java/org/apache/hudi/common/util/BufferedRandomAccessFile.java
 ##########
 @@ -0,0 +1,411 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.util;
+
+import org.apache.log4j.Logger;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.nio.ByteBuffer;
+
+/**
+ * Use a private buffer for the read/write/seek operations of the RandomAccessFile
 
 Review comment:
   @vinothchandar @nbalajee : I think we should still retain the LICENSE part and the reference in this file to be conservative as this implementation was based on the Cassandra source code and the structure is essentially same. It is better to err on the side of caution here. Let me know if you strongly think otherwise (cc @n3nash ).

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services