Hello Todd Lipcon, Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/8026

to look at the new patch set (#5).

Change subject: KUDU-1807 (part 2): ban GetTableSchema for table createdness in 
clients
......................................................................

KUDU-1807 (part 2): ban GetTableSchema for table createdness in clients

This patch modifies new Java clients to no longer use the create_table_done
field in GetTableSchema RPCs. After the CreateTable RPC returns, the client
will issue a GetTableSchema RPC to build a KuduTable, then enter an
IsCreateTableDone RPC loop until all of the tablets have been created.

There are a couple other changes worth noting:
- openTable no longer waits for table creation before returning. Doing that
  now would require at least one IsCreateTableDone RPC, which basically
  defeats the purpose of these changes. Moreover, the C++ client doesn't do
  this, so I don't see why the Java client should.
- I removed the 'tablesNotServed' logic which had no useful effect because,
  as I recently learned, there's retry logic to deal with TABLET_NOT_RUNNING
  master errors embedded more deeply in the Java client.
- I removed the master permit acquisition from the "is create table done"
  loop, since these loops should no longer produce a thundering herds (as I
  suppose they could have due to 'tablesNotServed').
- I modified createTable and alterTable to make waiting optional. The
  default behavior is to wait, which was already the case for createTable,
  but not for alterTable. I also added an isCreateTableDone method, which is
  now somewhat useful as createTable's waiting is optional.
- The IsCreateTableDone and IsAlterTableDone loops now use table IDs to
  ensure that they're robust in the face of concurrent operations that may
  change table names. This depends on AlterTableResponsePB containing table
  IDs, which was only true as of Kudu 0.10. If used against an older server,
  the client will throw an exception.

Change-Id: I54fa07dc34a97f1c9da06ec9129d6d4590b7aac6
---
M java/kudu-client/src/main/java/org/apache/kudu/client/AlterTableOptions.java
M java/kudu-client/src/main/java/org/apache/kudu/client/AlterTableResponse.java
M java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
M java/kudu-client/src/main/java/org/apache/kudu/client/CreateTableOptions.java
M java/kudu-client/src/main/java/org/apache/kudu/client/CreateTableRequest.java
M java/kudu-client/src/main/java/org/apache/kudu/client/CreateTableResponse.java
M java/kudu-client/src/main/java/org/apache/kudu/client/DeadlineTracker.java
M 
java/kudu-client/src/main/java/org/apache/kudu/client/GetTableSchemaRequest.java
M 
java/kudu-client/src/main/java/org/apache/kudu/client/GetTableSchemaResponse.java
M 
java/kudu-client/src/main/java/org/apache/kudu/client/IsAlterTableDoneRequest.java
M 
java/kudu-client/src/main/java/org/apache/kudu/client/IsCreateTableDoneRequest.java
A 
java/kudu-client/src/main/java/org/apache/kudu/client/IsCreateTableDoneResponse.java
M java/kudu-client/src/main/java/org/apache/kudu/client/KuduClient.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestAlterTable.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestDeadlineTracker.java
M 
java/kudu-client/src/test/java/org/apache/kudu/client/TestFlexiblePartitioning.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduTable.java
18 files changed, 708 insertions(+), 405 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/26/8026/5
-- 
To view, visit http://gerrit.cloudera.org:8080/8026
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I54fa07dc34a97f1c9da06ec9129d6d4590b7aac6
Gerrit-PatchSet: 5
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Jean-Daniel Cryans <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <[email protected]>

Reply via email to