[ https://issues.apache.org/jira/browse/HBASE-28174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17781958#comment-17781958 ]
James Udiljak commented on HBASE-28174: --------------------------------------- Hi again, I've cloned the HBase repo from the public GitHub repository and started working on this. However, the build process is giving me trouble. A full build with {{mvn package -DskipTests}} in the root of the repository succeeds but takes almost 3 hours. Trying to build just the REST package by running the same command in the {{hbase-rest}} subdirectory results in the following error output: {noformat} [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.344 s [INFO] Finished at: 2023-11-02T09:20:39+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project hbase-rest: Could not resolve dependencies for project org.apache.hbase:hbase-rest:jar:4.0.0-alpha-1-SNAPSHOT: The following artifacts could not be resolved: org.apache.hbase:hbase-logging:jar:tests:4.0.0-alpha-1-SNAPSHOT, org.apache.hbase:hbase-common:jar:4.0.0-alpha-1-SNAPSHOT, org.apache.hbase:hbase-common:jar:tests:4.0.0-alpha-1-SNAPSHOT, org.apache.hbase:hbase-protocol-shaded:jar:4.0.0-alpha-1-SNAPSHOT, org.apache.hbase:hbase-client:jar:4.0.0-alpha-1-SNAPSHOT, org.apache.hbase:hbase-server:jar:4.0.0-alpha-1-SNAPSHOT, org.apache.hbase:hbase-asyncfs:jar:tests:4.0.0-alpha-1-SNAPSHOT, org.apache.hbase:hbase-hadoop-compat:jar:4.0.0-alpha-1-SNAPSHOT, org.apache.hbase:hbase-mapreduce:jar:4.0.0-alpha-1-SNAPSHOT, org.apache.hbase:hbase-mapreduce:jar:tests:4.0.0-alpha-1-SNAPSHOT, org.apache.hbase:hbase-server:jar:tests:4.0.0-alpha-1-SNAPSHOT, org.apache.hbase:hbase-testing-util:jar:4.0.0-alpha-1-SNAPSHOT, org.apache.hbase:hbase-annotations:jar:tests:4.0.0-alpha-1-SNAPSHOT, org.apache.hbase:hbase-http:jar:tests:4.0.0-alpha-1-SNAPSHOT: Failure to find org.apache.hbase:hbase-logging:jar:tests:4.0.0-alpha-1-SNAPSHOT in https://repository.apache.org/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of apache.snapshots has elapsed or updates are forced -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException {noformat} Am I missing some sort of Maven configuration file? I had a quick look around in the repository but couldn't find much in the way of build instructions. > DELETE endpoint in REST API does not support deleting binary row keys/columns > ----------------------------------------------------------------------------- > > Key: HBASE-28174 > URL: https://issues.apache.org/jira/browse/HBASE-28174 > Project: HBase > Issue Type: Bug > Components: REST > Affects Versions: 2.4.17 > Reporter: James Udiljak > Assignee: James Udiljak > Priority: Blocker > Attachments: delete_base64_1.png > > > h2. Notes > This is the first time I have raised an issue in the ASF Jira. Please let me > know if there's anything I need to adjust on the issue to fit in with your > development flow. > I have marked the priority as "blocker" because this issue blocks me as a > user of the HBase REST API from deploying an effective solution for our > setup. Please feel free to change this if the Priority field has another > meaning to you. > I have also chosen 2.4.17 as the affected version because this is the version > I am running, however looking at the source code on GitHub in the default > branch, I think many other versions would be affected. > h2. Description of Issue > The DELETE operation in the [HBase REST > API|https://hbase.apache.org/1.2/apidocs/org/apache/hadoop/hbase/rest/package-summary.html#operation_delete] > requires specifying row keys and column families/offsets in the URI (i.e. as > UTF-8 text). This makes it impossible to specify a delete operation via the > REST API for a binary row key or column family/offset, as single bytes with a > decimal value greater than 127 are not valid in UTF-8. > Percent-encoding these "high" values does not work around the issue, as the > HBase REST API uses Java's {{URLDecoder.Decode(percentEncodedString, > "UTF-8")}} function, which replaces any percent-encoded byte in the range > {{%80}} to {{%FF}} with the [replacement > character|https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character]. > Even if this were not the case, the row-key is ultimately [converted to a > byte > array|https://github.com/apache/hbase/blob/rel/2.4.17/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowSpec.java#L60-L100] > using UTF-8 encoding, wherein code points >127 are encoded across multiple > bytes, corrupting the user-supplied row key. > h2. Proposed Solution > I do not believe it is possible to allow encoding of arbitrary bytes in the > URL for the DELETE endpoint without breaking compatibility for any users who > may have been unknowingly UTF-8 encoding their binary row keys. Even if it > were possible, the syntax would likely be terse. > Instead, I propose a new version of the DELETE endpoint that would accept row > keys and column families/offsets in the request _body_ (using Base64 encoding > for the JSON and XML formats, and bare binary for protobuf). This new > endpoint would follow the same conventions as the PUT operations, except that > cell values would not need to be specified (unless the user is performing a > check-and-delete operation). > As an additional benefit, using the request body could potentially allow for > deleting multiple rows in a single request, which would drastically improve > the efficiency of my use case. -- This message was sent by Atlassian Jira (v8.20.10#820010)