if (is_set_dependency_artifacts()) { if (!first) sb.append(", "); sb.append("dependency_artifacts:");
private List<LocalResource> getLocalResources(PortAndAssignment pna) throws IOException { String topologyId = pna.getToplogyId(); Map<String, Object> topoConf = ConfigUtils.readSupervisorStormConf(conf, topologyId); @SuppressWarnings("unchecked") Map<String, Map<String, Object>> blobstoreMap = (Map<String, Map<String, Object>>) topoConf.get(Config.TOPOLOGY_BLOBSTORE_MAP); List<LocalResource> ret = new ArrayList<>(); if (blobstoreMap != null) { List<LocalResource> tmp = SupervisorUtils.blobstoreMapToLocalresources(blobstoreMap); if (tmp != null) { ret.addAll(tmp); } } StormTopology stormCode = ConfigUtils.readSupervisorTopology(conf, topologyId, fsOps); List<String> dependencies = new ArrayList<>(); if (stormCode.is_set_dependency_jars()) { dependencies.addAll(stormCode.get_dependency_jars()); } if (stormCode.is_set_dependency_artifacts()) { dependencies.addAll(stormCode.get_dependency_artifacts()); } for (String dependency : dependencies) { ret.add(new LocalResource(dependency, false, true)); } return ret; }
private Set<String> getTopologyDependencyKeys(Set<String> activeTopologyCodeKeys) { Set<String> activeTopologyDependencies = new TreeSet<>(); Subject subject = ReqContext.context().subject(); for (String activeTopologyCodeKey : activeTopologyCodeKeys) { try (InputStreamWithMeta blob = blobStore.getBlob(activeTopologyCodeKey, subject)) { byte[] blobContent = IOUtils.readFully(blob, new Long(blob.getFileLength()).intValue()); StormTopology stormCode = Utils.deserialize(blobContent, StormTopology.class); if (stormCode.is_set_dependency_jars()) { activeTopologyDependencies.addAll(stormCode.get_dependency_jars()); } if (stormCode.is_set_dependency_artifacts()) { activeTopologyDependencies.addAll(stormCode.get_dependency_artifacts()); } } catch (AuthorizationException | KeyNotFoundException | IOException e) { LOG.error("Exception occurs while reading blob for key: " + activeTopologyCodeKey + ", exception: " + e, e); throw new RuntimeException("Exception occurs while reading blob for key: " + activeTopologyCodeKey + ", exception: " + e, e); } } return activeTopologyDependencies; }
this.dependency_jars = __this__dependency_jars; if (other.is_set_dependency_artifacts()) { java.util.List<java.lang.String> __this__dependency_artifacts = new java.util.ArrayList<java.lang.String>(other.dependency_artifacts); this.dependency_artifacts = __this__dependency_artifacts;
hashCode = hashCode * 8191 + dependency_jars.hashCode(); hashCode = hashCode * 8191 + ((is_set_dependency_artifacts()) ? 131071 : 524287); if (is_set_dependency_artifacts()) hashCode = hashCode * 8191 + dependency_artifacts.hashCode();
boolean this_present_dependency_artifacts = true && this.is_set_dependency_artifacts(); boolean that_present_dependency_artifacts = true && that.is_set_dependency_artifacts(); if (this_present_dependency_artifacts || that_present_dependency_artifacts) { if (!(this_present_dependency_artifacts && that_present_dependency_artifacts))
optionals.set(1); if (struct.is_set_dependency_artifacts()) { optionals.set(2); if (struct.is_set_dependency_artifacts()) {
lastComparison = java.lang.Boolean.valueOf(is_set_dependency_artifacts()).compareTo(other.is_set_dependency_artifacts()); if (lastComparison != 0) { return lastComparison; if (is_set_dependency_artifacts()) { lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(this.dependency_artifacts, other.dependency_artifacts); if (lastComparison != 0) {
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case SPOUTS: return is_set_spouts(); case BOLTS: return is_set_bolts(); case STATE_SPOUTS: return is_set_state_spouts(); case WORKER_HOOKS: return is_set_worker_hooks(); case DEPENDENCY_JARS: return is_set_dependency_jars(); case DEPENDENCY_ARTIFACTS: return is_set_dependency_artifacts(); case STORM_VERSION: return is_set_storm_version(); case JDK_VERSION: return is_set_jdk_version(); case COMPONENT_TO_SHARED_MEMORY: return is_set_component_to_shared_memory(); case SHARED_MEMORY: return is_set_shared_memory(); } throw new java.lang.IllegalStateException(); }
if (struct.is_set_dependency_artifacts()) { oprot.writeFieldBegin(DEPENDENCY_ARTIFACTS_FIELD_DESC);
list.add(dependency_jars); boolean present_dependency_artifacts = true && (is_set_dependency_artifacts()); list.add(present_dependency_artifacts); if (present_dependency_artifacts)
if (is_set_dependency_artifacts()) { if (!first) sb.append(", "); sb.append("dependency_artifacts:");
this.dependency_jars = __this__dependency_jars; if (other.is_set_dependency_artifacts()) { List<String> __this__dependency_artifacts = new ArrayList<String>(other.dependency_artifacts); this.dependency_artifacts = __this__dependency_artifacts;
private Set<String> getTopologyDependencyKeys(Set<String> activeTopologyCodeKeys) { Set<String> activeTopologyDependencies = new TreeSet<>(); Subject subject = ReqContext.context().subject(); for (String activeTopologyCodeKey : activeTopologyCodeKeys) { try { InputStreamWithMeta blob = blobStore.getBlob(activeTopologyCodeKey, subject); byte[] blobContent = IOUtils.readFully(blob, new Long(blob.getFileLength()).intValue()); StormTopology stormCode = Utils.deserialize(blobContent, StormTopology.class); if (stormCode.is_set_dependency_jars()) { activeTopologyDependencies.addAll(stormCode.get_dependency_jars()); } if (stormCode.is_set_dependency_artifacts()) { activeTopologyDependencies.addAll(stormCode.get_dependency_artifacts()); } } catch (AuthorizationException | KeyNotFoundException | IOException e) { LOG.error("Exception occurs while reading blob for key: " + activeTopologyCodeKey + ", exception: " + e, e); throw new RuntimeException("Exception occurs while reading blob for key: " + activeTopologyCodeKey + ", exception: " + e, e); } } return activeTopologyDependencies; }
dependencies.addAll(stormCode.get_dependency_jars()); if (stormCode.is_set_dependency_artifacts()) { dependencies.addAll(stormCode.get_dependency_artifacts());
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SPOUTS: return is_set_spouts(); case BOLTS: return is_set_bolts(); case STATE_SPOUTS: return is_set_state_spouts(); case WORKER_HOOKS: return is_set_worker_hooks(); case DEPENDENCY_JARS: return is_set_dependency_jars(); case DEPENDENCY_ARTIFACTS: return is_set_dependency_artifacts(); case STORM_VERSION: return is_set_storm_version(); case JDK_VERSION: return is_set_jdk_version(); } throw new IllegalStateException(); }
lastComparison = Boolean.valueOf(is_set_dependency_artifacts()).compareTo(other.is_set_dependency_artifacts()); if (lastComparison != 0) { return lastComparison; if (is_set_dependency_artifacts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dependency_artifacts, other.dependency_artifacts); if (lastComparison != 0) {
boolean this_present_dependency_artifacts = true && this.is_set_dependency_artifacts(); boolean that_present_dependency_artifacts = true && that.is_set_dependency_artifacts(); if (this_present_dependency_artifacts || that_present_dependency_artifacts) { if (!(this_present_dependency_artifacts && that_present_dependency_artifacts))
optionals.set(1); if (struct.is_set_dependency_artifacts()) { optionals.set(2); if (struct.is_set_dependency_artifacts()) {
if (struct.is_set_dependency_artifacts()) { oprot.writeFieldBegin(DEPENDENCY_ARTIFACTS_FIELD_DESC);