if (vertex.getInputSpecsCount() > 0) { for (IOSpecProto ioSpec : vertex.getInputSpecsList()) { sb.append("{").append(ioSpec.getConnectedVertexName()).append(",") .append(ioSpec.getIoDescriptor().getClassName()).append(",") .append(ioSpec.getPhysicalEdgeCount()).append("}"); if (vertex.getOutputSpecsCount() > 0) { for (IOSpecProto ioSpec : vertex.getOutputSpecsList()) { sb.append("{").append(ioSpec.getConnectedVertexName()).append(",") .append(ioSpec.getIoDescriptor().getClassName()).append(",") .append(ioSpec.getPhysicalEdgeCount()).append("}");
public org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.IOSpecProto buildPartial() { org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.IOSpecProto result = new org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.IOSpecProto(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.connectedVertexName_ = connectedVertexName_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } if (ioDescriptorBuilder_ == null) { result.ioDescriptor_ = ioDescriptor_; } else { result.ioDescriptor_ = ioDescriptorBuilder_.build(); } if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.physicalEdgeCount_ = physicalEdgeCount_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getConnectedVertexNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, ioDescriptor_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(3, physicalEdgeCount_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
if (vertex.getInputSpecsCount() > 0) { for (IOSpecProto ioSpec : vertex.getInputSpecsList()) { sb.append("{").append(ioSpec.getConnectedVertexName()).append(",") .append(ioSpec.getIoDescriptor().getClassName()).append(",") .append(ioSpec.getPhysicalEdgeCount()).append("}"); if (vertex.getOutputSpecsCount() > 0) { for (IOSpecProto ioSpec : vertex.getOutputSpecsList()) { sb.append("{").append(ioSpec.getConnectedVertexName()).append(",") .append(ioSpec.getIoDescriptor().getClassName()).append(",") .append(ioSpec.getPhysicalEdgeCount()).append("}");
private boolean canFinish() { List<IOSpecProto> inputSpecList = vertexSpec.getInputSpecsList(); boolean canFinish = true; if (inputSpecList != null && !inputSpecList.isEmpty()) { for (IOSpecProto inputSpec : inputSpecList) { if (LlapTezUtils.isSourceOfInterest(inputSpec.getIoDescriptor().getClassName())) { // Lookup the state in the map. LlapDaemonProtocolProtos.SourceStateProto state = queryInfo.getSourceStateMap() .get(inputSpec.getConnectedVertexName()); if (state != null && state == LlapDaemonProtocolProtos.SourceStateProto.S_SUCCEEDED) { continue; } else { if (LOG.isDebugEnabled()) { LOG.debug("Cannot finish due to source: " + inputSpec.getConnectedVertexName()); } canFinish = false; break; } } } } return canFinish; }
/** * * @param handler * @param lastFinishableState * @return true if the current state is the same as the lastFinishableState. false if the state has already changed. */ public boolean registerForFinishableStateUpdates(FinishableStateUpdateHandler handler, boolean lastFinishableState) { List<String> sourcesOfInterest = new LinkedList<>(); List<IOSpecProto> inputSpecList = vertexSpec.getInputSpecsList(); if (inputSpecList != null && !inputSpecList.isEmpty()) { for (IOSpecProto inputSpec : inputSpecList) { if (LlapTezUtils.isSourceOfInterest(inputSpec.getIoDescriptor().getClassName())) { sourcesOfInterest.add(inputSpec.getConnectedVertexName()); } } } return queryInfo.registerForFinishableStateUpdates(handler, sourcesOfInterest, this, lastFinishableState); }
private static Multimap<String, String> createStartedInputMap(SignableVertexSpec vertex) { Multimap<String, String> startedInputMap = HashMultimap.create(); // Let the Processor control start for Broadcast inputs. // TODO For now, this affects non broadcast unsorted cases as well. Make use of the edge // property when it's available. for (IOSpecProto inputSpec : vertex.getInputSpecsList()) { if (inputSpec.getIoDescriptor().getClassName().equals(UnorderedKVInput.class.getName())) { startedInputMap.put(vertex.getVertexName(), inputSpec.getConnectedVertexName()); } } return startedInputMap; }
EntityDescriptorProto.newBuilder().setClassName("fakeProcessorName").setUserPayload( UserPayloadProto.newBuilder().setUserPayload(ByteString.copyFrom(procBb)))); builder.addInputSpecs(IOSpecProto.newBuilder().setConnectedVertexName("sourceVertexName1") .setPhysicalEdgeCount(33).setIoDescriptor( EntityDescriptorProto.newBuilder().setClassName("input1ClassName").setUserPayload( UserPayloadProto.newBuilder().setUserPayload(ByteString.copyFrom(input1Bb))))); builder.addInputSpecs(IOSpecProto.newBuilder().setConnectedVertexName("sourceVertexName2") .setPhysicalEdgeCount(44).setIoDescriptor( EntityDescriptorProto.newBuilder().setClassName("input1ClassName").setUserPayload( UserPayloadProto.newBuilder().setUserPayload(ByteString.copyFrom(input1Bb))))); builder.addOutputSpecs(IOSpecProto.newBuilder().setConnectedVertexName("destVertexName1") .setPhysicalEdgeCount(55).setIoDescriptor( EntityDescriptorProto.newBuilder().setClassName("outputClassName").setUserPayload( UserPayloadProto.newBuilder().setUserPayload(ByteString.copyFrom(output1Bb))))); builder.addOutputSpecs(IOSpecProto.newBuilder().setConnectedVertexName("destVertexName2") .setPhysicalEdgeCount(66).setIoDescriptor( EntityDescriptorProto.newBuilder().setClassName("outputClassName").setUserPayload(
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.IOSpecProto)) { return super.equals(obj); } org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.IOSpecProto other = (org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.IOSpecProto) obj; boolean result = true; result = result && (hasConnectedVertexName() == other.hasConnectedVertexName()); if (hasConnectedVertexName()) { result = result && getConnectedVertexName() .equals(other.getConnectedVertexName()); } result = result && (hasIoDescriptor() == other.hasIoDescriptor()); if (hasIoDescriptor()) { result = result && getIoDescriptor() .equals(other.getIoDescriptor()); } result = result && (hasPhysicalEdgeCount() == other.hasPhysicalEdgeCount()); if (hasPhysicalEdgeCount()) { result = result && (getPhysicalEdgeCount() == other.getPhysicalEdgeCount()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
private boolean canFinish() { List<IOSpecProto> inputSpecList = vertexSpec.getInputSpecsList(); boolean canFinish = true; if (inputSpecList != null && !inputSpecList.isEmpty()) { for (IOSpecProto inputSpec : inputSpecList) { if (LlapTezUtils.isSourceOfInterest(inputSpec.getIoDescriptor().getClassName())) { // Lookup the state in the map. LlapDaemonProtocolProtos.SourceStateProto state = queryInfo.getSourceStateMap() .get(inputSpec.getConnectedVertexName()); if (state != null && state == LlapDaemonProtocolProtos.SourceStateProto.S_SUCCEEDED) { continue; } else { if (LOG.isDebugEnabled()) { LOG.debug("Cannot finish due to source: " + inputSpec.getConnectedVertexName()); } canFinish = false; break; } } } } return canFinish; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasConnectedVertexName()) { hash = (37 * hash) + CONNECTED_VERTEX_NAME_FIELD_NUMBER; hash = (53 * hash) + getConnectedVertexName().hashCode(); } if (hasIoDescriptor()) { hash = (37 * hash) + IO_DESCRIPTOR_FIELD_NUMBER; hash = (53 * hash) + getIoDescriptor().hashCode(); } if (hasPhysicalEdgeCount()) { hash = (37 * hash) + PHYSICAL_EDGE_COUNT_FIELD_NUMBER; hash = (53 * hash) + getPhysicalEdgeCount(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
/** * * @param handler * @param lastFinishableState * @return true if the current state is the same as the lastFinishableState. false if the state has already changed. */ public boolean registerForFinishableStateUpdates(FinishableStateUpdateHandler handler, boolean lastFinishableState) { List<String> sourcesOfInterest = new LinkedList<>(); List<IOSpecProto> inputSpecList = vertexSpec.getInputSpecsList(); if (inputSpecList != null && !inputSpecList.isEmpty()) { for (IOSpecProto inputSpec : inputSpecList) { if (LlapTezUtils.isSourceOfInterest(inputSpec.getIoDescriptor().getClassName())) { sourcesOfInterest.add(inputSpec.getConnectedVertexName()); } } } return queryInfo.registerForFinishableStateUpdates(handler, sourcesOfInterest, this, lastFinishableState); }
public Builder toBuilder() { return newBuilder(this); }
public Builder mergeFrom(org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.IOSpecProto other) { if (other == org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.IOSpecProto.getDefaultInstance()) return this; if (other.hasConnectedVertexName()) { bitField0_ |= 0x00000001; connectedVertexName_ = other.connectedVertexName_; onChanged(); } if (other.hasIoDescriptor()) { mergeIoDescriptor(other.getIoDescriptor()); } if (other.hasPhysicalEdgeCount()) { setPhysicalEdgeCount(other.getPhysicalEdgeCount()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.IOSpecProto prototype) {
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getConnectedVertexNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeMessage(2, ioDescriptor_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeInt32(3, physicalEdgeCount_); } getUnknownFields().writeTo(output); }
public org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.IOSpecProto getDefaultInstanceForType() { return org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.IOSpecProto.getDefaultInstance(); }
public static Builder newBuilder(org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.IOSpecProto prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
/** * <code>repeated .IOSpecProto output_specs = 11;</code> */ public org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.IOSpecProto.Builder addOutputSpecsBuilder( int index) { return getOutputSpecsFieldBuilder().addBuilder( index, org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.IOSpecProto.getDefaultInstance()); } /**
/** * <code>repeated .IOSpecProto input_specs = 10;</code> */ public org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.IOSpecProto.Builder addInputSpecsBuilder( int index) { return getInputSpecsFieldBuilder().addBuilder( index, org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos.IOSpecProto.getDefaultInstance()); } /**