You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/11/23 17:53:12 UTC

[GitHub] [hbase-filesystem] steveloughran opened a new pull request #30: HBASE-26483. [HBOSS] add support for openFile(path)

steveloughran opened a new pull request #30:
URL: https://github.com/apache/hbase-filesystem/pull/30


   
   Adds support for the openFile(path) method which returns a builder to open a file.
   
   Currently this falls through to the wrapped class.
   With this patch a builder is returned which acquires a lock in the final build() call,
   not when the openFile(path) method is invoked -as that does not trigger any
   file IO.
   
   openFile(PathHandle) is rejected as unsupported.
   
   
   This doesn't build with the hadoop-3.2 profile, but that
   didn't seem to build anyway.
   
   


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

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase-filesystem] steveloughran commented on pull request #30: HBASE-26483. [HBOSS] add support for openFile(path)

Posted by GitBox <gi...@apache.org>.
steveloughran commented on pull request #30:
URL: https://github.com/apache/hbase-filesystem/pull/30#issuecomment-985640916


   I can't work on this right now because of an injury; I have realized the way to do it is to provide a subclass of `HBaseObjectStoreSemantics` in the 3.2 source directory


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

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase-filesystem] steveloughran commented on a change in pull request #30: HBASE-26483. [HBOSS] add support for openFile(path)

Posted by GitBox <gi...@apache.org>.
steveloughran commented on a change in pull request #30:
URL: https://github.com/apache/hbase-filesystem/pull/30#discussion_r755898528



##########
File path: hbase-oss/src/main/java/org/apache/hadoop/hbase/oss/HBaseObjectStoreSemantics.java
##########
@@ -170,6 +173,26 @@ public FSDataInputStream open(Path f) throws IOException {
     }
   }
 
+  @Override
+  public FutureDataInputStreamBuilder openFile(final Path path)
+      throws IOException, UnsupportedOperationException {
+    return new LockedFutureDataInputStreamBuilder(sync, path,
+        fs.openFile(path));
+  }
+
+  /**
+   * This is mostly unsupported, and as there's no way to
+   * get the path from a pathHandle, impossible to lock.
+   * @param pathHandle path
+   * @return never returns successfully.
+   * @throws UnsupportedOperationException always
+   */
+  @Override
+  public FutureDataInputStreamBuilder openFile(final PathHandle pathHandle)
+      throws IOException, UnsupportedOperationException {
+    throw new UnsupportedOperationException("openFile(PathHandle) unsupported");
+  }
+

Review comment:
       yes, just reject it. you are currently never going to be trying to use hboss on a store which implements it (hdfs, webhdfs), but due diligence is always good




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

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase-filesystem] wchevreuil commented on a change in pull request #30: HBASE-26483. [HBOSS] add support for openFile(path)

Posted by GitBox <gi...@apache.org>.
wchevreuil commented on a change in pull request #30:
URL: https://github.com/apache/hbase-filesystem/pull/30#discussion_r755558431



##########
File path: hbase-oss/src/main/java/org/apache/hadoop/hbase/oss/HBaseObjectStoreSemantics.java
##########
@@ -170,6 +173,26 @@ public FSDataInputStream open(Path f) throws IOException {
     }
   }
 
+  @Override
+  public FutureDataInputStreamBuilder openFile(final Path path)
+      throws IOException, UnsupportedOperationException {
+    return new LockedFutureDataInputStreamBuilder(sync, path,
+        fs.openFile(path));
+  }
+
+  /**
+   * This is mostly unsupported, and as there's no way to
+   * get the path from a pathHandle, impossible to lock.
+   * @param pathHandle path
+   * @return never returns successfully.
+   * @throws UnsupportedOperationException always
+   */
+  @Override
+  public FutureDataInputStreamBuilder openFile(final PathHandle pathHandle)
+      throws IOException, UnsupportedOperationException {
+    throw new UnsupportedOperationException("openFile(PathHandle) unsupported");
+  }
+

Review comment:
       It seems we also missed wrapping `open(PathHandle fd, int bufferSize)`, on HBaseObjectStoreSemantics. Can we do something similar?




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

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org