Skip to content

Commit

Permalink
javadoc indentation fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
spollapally committed Jun 26, 2018
1 parent 6a011b1 commit d530655
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
* try(TableAdminClient client = TableAdminClient.create(InstanceName.of("[PROJECT]", "[INSTANCE]"))) {
* CreateTable createTableReq =
* TableAdminRequests.createTable("tableId")
* .addColumnFamily("cf1")
* .addColumnFamily("cf2", GCRULES.maxVersions(10))
* .addFamily("cf1")
* .addFamily("cf2", GCRULES.maxVersions(10))
* .addSplit(ByteString.copyFromUtf8("b"))
* .addSplit(ByteString.copyFromUtf8("q"));
* client.createTable(createTableReq);
Expand All @@ -80,9 +80,9 @@
* BigtableTableAdminSettings bigtableTableAdminSettings =
* BigtableTableAdminSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
* .build();
* .build();
* TableAdminClient client =
* TableAdminClient.create(InstanceName.of("[PROJECT]", "[INSTANCE]"), bigtableTableAdminSettings);
* TableAdminClient.create(InstanceName.of("[PROJECT]", "[INSTANCE]"), bigtableTableAdminSettings);
* }</pre>
*
* To customize the endpoint:
Expand All @@ -91,7 +91,7 @@
* BigtableTableAdminSettings bigtableTableAdminSettings =
* BigtableTableAdminSettings.newBuilder().setEndpoint(myEndpoint).build();
* TableAdminClient client =
* TableAdminClient.create(InstanceName.of("[PROJECT]", "[INSTANCE]"), bigtableTableAdminSettings);
* TableAdminClient.create(InstanceName.of("[PROJECT]", "[INSTANCE]"), bigtableTableAdminSettings);
* }</pre>
*/
@BetaApi
Expand Down Expand Up @@ -173,7 +173,7 @@ public void close() {
* try(TableAdminClient client = TableAdminClient.create(InstanceName.of("[PROJECT]", "[INSTANCE]"))) {
* CreateTable createTableReq =
* TableAdminRequests.createTable("tableId")
* .addColumnFamily("cf2", GCRULES.maxVersions(10))
* .addFamily("cf2", GCRULES.maxVersions(10))
* client.createTable(createTableReq);
* }
* }</pre>
Expand All @@ -197,8 +197,7 @@ public Table createTable(CreateTable createTable) {
* try(TableAdminClient client = TableAdminClient.create(InstanceName.of("[PROJECT]", "[INSTANCE]"))) {
* CreateTable createTableReq =
* TableAdminRequests.createTable("tableId")
* .addColumnFamily("cf2", GCRULES.maxVersions(10))
*
* .addFamily("cf2", GCRULES.maxVersions(10))
* client.createTableAsync(createTableReq);
* }
* }</pre>
Expand Down Expand Up @@ -612,11 +611,11 @@ public boolean isConsistent(String tableId, ConsistencyToken token) {
* @return ApiFuture<Boolean>
*/
public ApiFuture<Boolean> isConsistentAsync(String tableId, ConsistencyToken token) {
ApiFuture<CheckConsistencyResponse> CheckConsResp =
ApiFuture<CheckConsistencyResponse> checkConsResp =
stub.checkConsistencyCallable().futureCall(token.toProto(getTableName(tableId)));

return ApiFutures.transform(
CheckConsResp,
checkConsResp,
new ApiFunction<CheckConsistencyResponse, Boolean>() {
@Override
public Boolean apply(CheckConsistencyResponse input) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ private VersionRule(int maxVersion) {

/** Gets the configured maximum versions */
public int getMaxVersions() {
return toProto().getMaxNumVersions();
return builder.getMaxNumVersions();
}

@Override
Expand Down Expand Up @@ -240,9 +240,7 @@ private DurationRule(Duration duration) {
* @return Duration
*/
public Duration getMaxAge() {
long seconds = toProto().getMaxAge().getSeconds();
int nanos = toProto().getMaxAge().getNanos();
return Duration.ofSeconds(seconds, nanos);
return Duration.ofSeconds(builder.getSeconds(), builder.getNanos());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private CreateTable(String tableId) {
*
* @param familyId
*/
public CreateTable addColumnFamily(String familyId) {
public CreateTable addFamily(String familyId) {
Preconditions.checkNotNull(familyId);
tableRequest.putColumnFamilies(familyId, ColumnFamily.newBuilder().build());
return this;
Expand All @@ -95,7 +95,7 @@ public CreateTable addColumnFamily(String familyId) {
* @param familyId
* @param gcRule
*/
public CreateTable addColumnFamily(String familyId, GCRule gcRule) {
public CreateTable addFamily(String familyId, GCRule gcRule) {
Preconditions.checkNotNull(familyId);
tableRequest.putColumnFamilies(
familyId, ColumnFamily.newBuilder().setGcRule(gcRule.toProto()).build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public void createTable() throws Exception {
String tableId = "adminCreateTest";
CreateTable createTableReq =
TableAdminRequests.createTable(tableId)
.addColumnFamily("cf1")
.addColumnFamily("cf2", GCRULES.maxVersions(10))
.addFamily("cf1")
.addFamily("cf2", GCRULES.maxVersions(10))
.addSplit(ByteString.copyFromUtf8("b"))
.addSplit(ByteString.copyFromUtf8("q"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public class TableAdminRequestsTest {
public void createTable() {
CreateTableRequest actual =
TableAdminRequests.createTable("tableId")
.addColumnFamily("cf1")
.addColumnFamily("cf2", GCRules.GCRULES.maxVersions(1))
.addFamily("cf1")
.addFamily("cf2", GCRules.GCRULES.maxVersions(1))
.addSplit(ByteString.copyFromUtf8("c"))
.toProto(instanceName);

Expand Down

0 comments on commit d530655

Please sign in to comment.