[GitHub] incubator-omid pull request #20: [OMID-85] Writing directly to HBase using s...
Github user ohadshacham closed the pull request at: https://github.com/apache/incubator-omid/pull/20 ---
[GitHub] incubator-omid pull request #20: [OMID-85] Writing directly to HBase using s...
Github user ebortnikov commented on a diff in the pull request: https://github.com/apache/incubator-omid/pull/20#discussion_r166407100 --- Diff: hbase-client/src/main/java/org/apache/omid/transaction/TTable.java --- @@ -293,15 +293,11 @@ public void delete(Transaction tx, Delete delete) throws IOException { } -/** - * Transactional version of {@link HTableInterface#put(Put put)} - * - * @param put an instance of Put - * @param tx an instance of transaction to be used - * @throws IOException if a remote or network exception occurs. - */ -public void put(Transaction tx, Put put) throws IOException { +interface UpdateMetaData { --- End diff -- What is the scope of this interface? Why is it package-level? ---
[GitHub] incubator-omid pull request #20: [OMID-85] Writing directly to HBase using s...
Github user ebortnikov commented on a diff in the pull request: https://github.com/apache/incubator-omid/pull/20#discussion_r166408476 --- Diff: hbase-client/src/main/java/org/apache/omid/transaction/TTable.java --- @@ -321,16 +317,51 @@ public void put(Transaction tx, Put put) throws IOException { Bytes.putLong(kv.getValueArray(), kv.getTimestampOffset(), writeTimestamp); tsput.add(kv); -transaction.addWriteSetElement( +updateMetaData.update(transaction, kv, tsput); +} +} + +table.put(tsput); +} + +/** + * putWithAutocommit implementation. Similar to a transactional put that includes the commit time stamp. + * + * @param put an instance of Put + * @param tx an instance of transaction to be used + * @throws IOException if a remote or network exception occurs. + */ +public void putWithAutocommit(Transaction tx, Put put) throws IOException { --- End diff -- Not sure it's a good idea to have a separate method for this. Is it painful to add a parameter? Alternatively, maybe you could pass an attribute to propagate (mechanism defined in OMID-83)? ---
[GitHub] incubator-omid pull request #20: [OMID-85] Writing directly to HBase using s...
GitHub user ohadshacham opened a pull request: https://github.com/apache/incubator-omid/pull/20 [OMID-85] Writing directly to HBase using specific version marks the ⦠â¦write as a write that was done by a specific transaction. However, due to lack of shadow cells, getting the commit timestamp of the transaction can be done only by access the commit table. The motivation of this feature is to add the shadow cells during the write and save the commit table access. This feature is required by Apache Phoenix that during index creation adds the data table's entries, appeared before creation, to the index. In this case, the version and the commit timestamp should be the fence id and therefore, a direct write to HBase with the addition of shadow cells is required. You can merge this pull request into a Git repository by running: $ git pull https://github.com/ohadshacham/incubator-omid AutoCommit Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-omid/pull/20.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #20 commit 462984833997c6192ae30788f5f7a3d866d41dce Author: Ohad Shacham Date: 2018-02-01T15:13:08Z [OMID-85] Writing directly to HBase using specific version marks the write as a write that was done by a specific transaction. However, due to lack of shadow cells, getting the commit timestamp of the transaction can be done only by access the commit table. The motivation of this feature is to add the shadow cells during the write and save the commit table access. This feature is required by Apache Phoenix that during index creation adds the data table's entries, appeared before creation, to the index. In this case, the version and the commit timestamp should be the fence id and therefore, a direct write to HBase with the addition of shadow cells is required. ---