public Builder mergeFrom(org.apache.tajo.catalog.proto.CatalogProtos.IndexListResponse other) { if (other == org.apache.tajo.catalog.proto.CatalogProtos.IndexListResponse.getDefaultInstance()) return this; if (other.hasState()) { mergeState(other.getState());
@Override public final Collection<IndexDesc> getAllIndexesByTable(final String databaseName, final String tableName) { try { TableIdentifierProto proto = CatalogUtil.buildTableIdentifier(databaseName, tableName); final BlockingInterface stub = getStub(); final IndexListResponse response = stub.getAllIndexesByTable(null, proto); ensureOk(response.getState()); List<IndexDesc> indexDescs = new ArrayList<>(); for (IndexDescProto descProto : response.getIndexDescList()) { indexDescs.add(new IndexDesc(descProto)); } return indexDescs; } catch (ServiceException e) { throw new RuntimeException(e); } }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasState()) { hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + getState().hashCode(); } if (getIndexDescCount() > 0) { hash = (37 * hash) + INDEXDESC_FIELD_NUMBER; hash = (53 * hash) + getIndexDescList().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.IndexListResponse)) { return super.equals(obj); } org.apache.tajo.catalog.proto.CatalogProtos.IndexListResponse other = (org.apache.tajo.catalog.proto.CatalogProtos.IndexListResponse) obj; boolean result = true; result = result && (hasState() == other.hasState()); if (hasState()) { result = result && getState() .equals(other.getState()); } result = result && getIndexDescList() .equals(other.getIndexDescList()); result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasState()) { memoizedIsInitialized = 0; return false; } if (!getState().isInitialized()) { memoizedIsInitialized = 0; return false; } for (int i = 0; i < getIndexDescCount(); i++) { if (!getIndexDesc(i).isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; }
@Override public final Collection<IndexDesc> getAllIndexesByTable(final String databaseName, final String tableName) { try { TableIdentifierProto proto = CatalogUtil.buildTableIdentifier(databaseName, tableName); final BlockingInterface stub = getStub(); final IndexListResponse response = stub.getAllIndexesByTable(null, proto); ensureOk(response.getState()); List<IndexDesc> indexDescs = TUtil.newList(); for (IndexDescProto descProto : response.getIndexDescList()) { indexDescs.add(new IndexDesc(descProto)); } return indexDescs; } catch (ServiceException e) { throw new RuntimeException(e); } }
@Override public List<IndexDescProto> getIndexes(final String tableName) { final BlockingInterface stub = conn.getTMStub(); IndexListResponse response; try { response = stub.getIndexesForTable(null, conn.getSessionedString(tableName)); } catch (ServiceException e) { throw new RuntimeException(e); } ensureOk(response.getState()); return response.getIndexDescList(); }
@Override public List<IndexDescProto> getIndexes(final String tableName) { final BlockingInterface stub = conn.getTMStub(); IndexListResponse response; try { response = stub.getIndexesForTable(null, conn.getSessionedString(tableName)); } catch (ServiceException e) { throw new RuntimeException(e); } ensureOk(response.getState()); return response.getIndexDescList(); }
@Override public List<IndexDescProto> getAllIndexes() { try { final BlockingInterface stub = getStub(); final IndexListResponse response = stub.getAllIndexes(null, ProtoUtil.NULL_PROTO); ensureOk(response.getState()); return response.getIndexDescList(); } catch (ServiceException e) { LOG.error(e.getMessage(), e); return null; } }
@Override public List<IndexDescProto> getAllIndexes() { try { final BlockingInterface stub = getStub(); final IndexListResponse response = stub.getAllIndexes(null, ProtoUtil.NULL_PROTO); ensureOk(response.getState()); return response.getIndexDescList(); } catch (ServiceException e) { LOG.error(e.getMessage(), e); return null; } }