if (isSetNs()) { if (!first) sb.append(", "); sb.append("ns:");
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_name = true && (isSetName()); list.add(present_name); if (present_name) list.add(name); boolean present_status = true && (isSetStatus()); list.add(present_status); if (present_status) list.add(status.getValue()); boolean present_queryParallelism = true && (isSetQueryParallelism()); list.add(present_queryParallelism); if (present_queryParallelism) list.add(queryParallelism); boolean present_defaultPoolPath = true && (isSetDefaultPoolPath()); list.add(present_defaultPoolPath); if (present_defaultPoolPath) list.add(defaultPoolPath); boolean present_ns = true && (isSetNs()); list.add(present_ns); if (present_ns) list.add(ns); return list.hashCode(); }
if (struct.isSetNs()) { oprot.writeFieldBegin(NS_FIELD_DESC); oprot.writeString(struct.ns);
/** 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 NAME: return isSetName(); case STATUS: return isSetStatus(); case QUERY_PARALLELISM: return isSetQueryParallelism(); case DEFAULT_POOL_PATH: return isSetDefaultPoolPath(); case NS: return isSetNs(); } throw new IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public WMResourcePlan(WMResourcePlan other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetName()) { this.name = other.name; } if (other.isSetStatus()) { this.status = other.status; } this.queryParallelism = other.queryParallelism; if (other.isSetDefaultPoolPath()) { this.defaultPoolPath = other.defaultPoolPath; } if (other.isSetNs()) { this.ns = other.ns; } }
public void createResourcePlan(WMResourcePlan resourcePlan, String copyFromName, boolean ifNotExists) throws HiveException { String ns = conf.getVar(ConfVars.HIVE_SERVER2_WM_NAMESPACE); if (resourcePlan.isSetNs() && !ns.equals(resourcePlan.getNs())) { throw new HiveException("Cannot create a plan in a different NS; was " + resourcePlan.getNs() + ", configured " + ns); } resourcePlan.setNs(ns); try { getMSC().createResourcePlan(resourcePlan, copyFromName); } catch (AlreadyExistsException e) { if (!ifNotExists) { throw new HiveException(e, ErrorMsg.RESOURCE_PLAN_ALREADY_EXISTS, resourcePlan.getName()); } } catch (Exception e) { throw new HiveException(e); } }