public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { String theKey; theKey = this.getKey(); strategy.appendField(locator, this, "key", buffer, theKey); } { String theValue; theValue = this.getValue(); strategy.appendField(locator, this, "value", buffer, theValue); } return buffer; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { String theKey; theKey = this.getKey(); strategy.appendField(locator, this, "key", buffer, theKey); } { String theValue; theValue = this.getValue(); strategy.appendField(locator, this, "value", buffer, theValue); } return buffer; }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { String theKey; theKey = this.getKey(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "key", theKey), currentHashCode, theKey); } { String theValue; theValue = this.getValue(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "value", theValue), currentHashCode, theValue); } return currentHashCode; }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { String theKey; theKey = this.getKey(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "key", theKey), currentHashCode, theKey); } { String theValue; theValue = this.getValue(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "value", theValue), currentHashCode, theValue); } return currentHashCode; }
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof MapType)) { return false; } if (this == object) { return true; } final MapType that = ((MapType) object); { String lhsKey; lhsKey = this.getKey(); String rhsKey; rhsKey = that.getKey(); if (!strategy.equals(LocatorUtils.property(thisLocator, "key", lhsKey), LocatorUtils.property(thatLocator, "key", rhsKey), lhsKey, rhsKey)) { return false; } } { String lhsValue; lhsValue = this.getValue(); String rhsValue; rhsValue = that.getValue(); if (!strategy.equals(LocatorUtils.property(thisLocator, "value", lhsValue), LocatorUtils.property(thatLocator, "value", rhsValue), lhsValue, rhsValue)) { return false; } } return true; }
private LensConf getLensConf(XJob job, SchedulerJobInstanceHandle instanceHandle, DateTime scheduledTime) { List<MapType> jobConf = job.getExecution().getQuery().getConf(); LensConf queryConf = new LensConf(); for (MapType element : jobConf) { queryConf.addProperty(element.getKey(), element.getValue()); } queryConf.addProperty(JOB_INSTANCE_ID_KEY, instanceHandle.getHandleId()); // Current time is used for resolving date. queryConf.addProperty(LensConfConstants.QUERY_CURRENT_TIME_IN_MILLIS, scheduledTime.getMillis()); return queryConf; }
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof MapType)) { return false; } if (this == object) { return true; } final MapType that = ((MapType) object); { String lhsKey; lhsKey = this.getKey(); String rhsKey; rhsKey = that.getKey(); if (!strategy.equals(LocatorUtils.property(thisLocator, "key", lhsKey), LocatorUtils.property(thatLocator, "key", rhsKey), lhsKey, rhsKey)) { return false; } } { String lhsValue; lhsValue = this.getValue(); String rhsValue; rhsValue = that.getValue(); if (!strategy.equals(LocatorUtils.property(thisLocator, "value", lhsValue), LocatorUtils.property(thatLocator, "value", rhsValue), lhsValue, rhsValue)) { return false; } } return true; }
private void setSessionConf(LensSessionHandle sessionHandle, XJob job) throws LensException { XExecution execution = job.getExecution(); XSessionType executionSession = execution.getSession(); cubeMetastoreService.setCurrentDatabase(sessionHandle, executionSession.getDb()); List<MapType> sessionConfList = executionSession.getConf(); for (MapType element : sessionConfList) { sessionService.setSessionParameter(sessionHandle, element.getKey(), element.getValue()); } List<ResourcePath> resourceList = executionSession.getResourcePath(); for (ResourcePath path : resourceList) { sessionService.addResource(sessionHandle, path.getType(), path.getPath()); } }
private void checkQuery(LensSessionHandle sessionHandle, XJob job) throws LensException { List<MapType> jobConf = job.getExecution().getQuery().getConf(); LensConf queryConf = new LensConf(); for (MapType element : jobConf) { queryConf.addProperty(element.getKey(), element.getValue()); } queryConf.addProperty(CubeQueryConfUtil.FAIL_QUERY_ON_PARTIAL_DATA, false); queryService.estimate(LensServices.get().getLogSegregationContext().getLogSegragationId(), sessionHandle, job.getExecution().getQuery().getQuery(), queryConf); }