@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 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(); } }
@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; }
@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; }
/** * <code>required string tablespace_uri = 2;</code> */ public Builder clearTablespaceUri() { bitField0_ = (bitField0_ & ~0x00000002); tablespaceUri_ = getDefaultInstance().getTablespaceUri(); onChanged(); return this; } /**