@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.tajo.catalog.proto.CatalogProtos.CreateTablespaceRequest)) { return super.equals(obj); } org.apache.tajo.catalog.proto.CatalogProtos.CreateTablespaceRequest other = (org.apache.tajo.catalog.proto.CatalogProtos.CreateTablespaceRequest) obj; boolean result = true; result = result && (hasTablespaceName() == other.hasTablespaceName()); if (hasTablespaceName()) { result = result && getTablespaceName() .equals(other.getTablespaceName()); } result = result && (hasTablespaceUri() == other.hasTablespaceUri()); if (hasTablespaceUri()) { result = result && getTablespaceUri() .equals(other.getTablespaceUri()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasTablespaceName()) { hash = (37 * hash) + TABLESPACE_NAME_FIELD_NUMBER; hash = (53 * hash) + getTablespaceName().hashCode(); } if (hasTablespaceUri()) { hash = (37 * hash) + TABLESPACE_URI_FIELD_NUMBER; hash = (53 * hash) + getTablespaceUri().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getTablespaceNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getTablespaceUriBytes()); } getUnknownFields().writeTo(output); }
return org.apache.tajo.catalog.proto.CatalogProtos.CreateTablespaceRequest.getDefaultInstance(); case 1: return org.apache.tajo.rpc.protocolrecords.PrimitiveProtos.StringProto.getDefaultInstance();
return org.apache.tajo.catalog.proto.CatalogProtos.CreateTablespaceRequest.getDefaultInstance(); case 1: return org.apache.tajo.rpc.protocolrecords.PrimitiveProtos.StringProto.getDefaultInstance();
return org.apache.tajo.catalog.proto.CatalogProtos.CreateTablespaceRequest.getDefaultInstance(); case 1: return org.apache.tajo.rpc.protocolrecords.PrimitiveProtos.StringProto.getDefaultInstance();
return org.apache.tajo.catalog.proto.CatalogProtos.CreateTablespaceRequest.getDefaultInstance(); case 1: return org.apache.tajo.rpc.protocolrecords.PrimitiveProtos.StringProto.getDefaultInstance();
@Override public ReturnState createTablespace(RpcController controller, CreateTablespaceRequest request) { final String tablespaceName = request.getTablespaceName(); final String uri = request.getTablespaceUri(); wlock.lock(); try { store.createTablespace(tablespaceName, uri); LOG.info(String.format("tablespace \"%s\" (%s) is created", tablespaceName, uri)); return OK; } catch (Throwable t) { printStackTraceIfError(LOG, t); return returnError(t); } finally { wlock.unlock(); } }
@Override public final void createTablespace(final String tablespaceName, final String tablespaceUri) throws DuplicateTablespaceException { try { final BlockingInterface stub = getStub(); final CreateTablespaceRequest request = CreateTablespaceRequest.newBuilder() .setTablespaceName(tablespaceName) .setTablespaceUri(tablespaceUri) .build(); final ReturnState state = stub.createTablespace(null, request); throwsIfThisError(state, DuplicateTablespaceException.class); ensureOk(state); } catch (ServiceException e) { throw new RuntimeException(e); } }
@Override public final void createTablespace(final String tablespaceName, final String tablespaceUri) throws DuplicateTablespaceException { try { final BlockingInterface stub = getStub(); final CreateTablespaceRequest request = CreateTablespaceRequest.newBuilder() .setTablespaceName(tablespaceName) .setTablespaceUri(tablespaceUri) .build(); final ReturnState state = stub.createTablespace(null, request); throwsIfThisError(state, DuplicateTablespaceException.class); ensureOk(state); } catch (ServiceException e) { throw new RuntimeException(e); } }
public Builder toBuilder() { return newBuilder(this); }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getTablespaceNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getTablespaceUriBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public org.apache.tajo.catalog.proto.CatalogProtos.CreateTablespaceRequest buildPartial() { org.apache.tajo.catalog.proto.CatalogProtos.CreateTablespaceRequest result = new org.apache.tajo.catalog.proto.CatalogProtos.CreateTablespaceRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.tablespaceName_ = tablespaceName_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.tablespaceUri_ = tablespaceUri_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
@Override public ReturnState createTablespace(RpcController controller, CreateTablespaceRequest request) { final String tablespaceName = request.getTablespaceName(); final String uri = request.getTablespaceUri(); wlock.lock(); try { store.createTablespace(tablespaceName, uri); LOG.info(String.format("tablespace \"%s\" (%s) is created", tablespaceName, uri)); return OK; } catch (Throwable t) { printStackTraceIfError(LOG, t); return returnError(t); } finally { wlock.unlock(); } }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.apache.tajo.catalog.proto.CatalogProtos.CreateTablespaceRequest prototype) {
public Builder mergeFrom(org.apache.tajo.catalog.proto.CatalogProtos.CreateTablespaceRequest other) { if (other == org.apache.tajo.catalog.proto.CatalogProtos.CreateTablespaceRequest.getDefaultInstance()) return this; if (other.hasTablespaceName()) { bitField0_ |= 0x00000001; tablespaceName_ = other.tablespaceName_; onChanged(); } if (other.hasTablespaceUri()) { bitField0_ |= 0x00000002; tablespaceUri_ = other.tablespaceUri_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public org.apache.tajo.catalog.proto.CatalogProtos.CreateTablespaceRequest getDefaultInstanceForType() { return org.apache.tajo.catalog.proto.CatalogProtos.CreateTablespaceRequest.getDefaultInstance(); }
public static Builder newBuilder(org.apache.tajo.catalog.proto.CatalogProtos.CreateTablespaceRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
/** * <code>required string tablespace_uri = 2;</code> */ public Builder clearTablespaceUri() { bitField0_ = (bitField0_ & ~0x00000002); tablespaceUri_ = getDefaultInstance().getTablespaceUri(); onChanged(); return this; } /**
/** * <code>required string tablespace_name = 1;</code> */ public Builder clearTablespaceName() { bitField0_ = (bitField0_ & ~0x00000001); tablespaceName_ = getDefaultInstance().getTablespaceName(); onChanged(); return this; } /**