Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DB4C3200CDA for ; Fri, 4 Aug 2017 22:10:20 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D992616E35E; Fri, 4 Aug 2017 20:10:20 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 59C6716E352 for ; Fri, 4 Aug 2017 22:10:19 +0200 (CEST) Received: (qmail 91520 invoked by uid 500); 4 Aug 2017 20:10:18 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 91511 invoked by uid 99); 4 Aug 2017 20:10:18 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Aug 2017 20:10:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 64654E3C41; Fri, 4 Aug 2017 20:10:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: machristie@apache.org To: commits@airavata.apache.org Date: Fri, 04 Aug 2017 20:10:18 -0000 Message-Id: <4e8f75634d3f43a2b7d8ebd1a483fed9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [01/51] [partial] airavata git commit: AIRAVATA-2505 Upgrade Airavata to Thrift 0.10.0 archived-at: Fri, 04 Aug 2017 20:10:21 -0000 Repository: airavata Updated Branches: refs/heads/thrift-0.10.0-upgrade [created] 9d165bd87 http://git-wip-us.apache.org/repos/asf/airavata/blob/9d165bd8/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/job/JobModel.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/job/JobModel.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/job/JobModel.java index 9553b0c..508709a 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/job/JobModel.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/job/JobModel.java @@ -16,42 +16,15 @@ */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.10.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.airavata.model.job; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") public class JobModel implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobModel"); @@ -68,23 +41,20 @@ public class JobModel implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new JobModelStandardSchemeFactory()); - schemes.put(TupleScheme.class, new JobModelTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new JobModelStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new JobModelTupleSchemeFactory(); - private String jobId; // required - private String taskId; // required - private String processId; // required - private String jobDescription; // required + private java.lang.String jobId; // required + private java.lang.String taskId; // required + private java.lang.String processId; // required + private java.lang.String jobDescription; // required private long creationTime; // optional - private List jobStatuses; // optional - private String computeResourceConsumed; // optional - private String jobName; // optional - private String workingDir; // optional - private String stdOut; // optional - private String stdErr; // optional + private java.util.List jobStatuses; // optional + private java.lang.String computeResourceConsumed; // optional + private java.lang.String jobName; // optional + private java.lang.String workingDir; // optional + private java.lang.String stdOut; // optional + private java.lang.String stdErr; // optional private int exitCode; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -102,10 +72,10 @@ public class JobModel implements org.apache.thrift.TBase byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -150,21 +120,21 @@ public class JobModel implements org.apache.thrift.TBase metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.JOB_ID, new org.apache.thrift.meta_data.FieldMetaData("jobId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.REQUIRED, @@ -211,7 +181,7 @@ public class JobModel implements org.apache.thrift.TBase __this__jobStatuses = new ArrayList(other.jobStatuses.size()); + java.util.List __this__jobStatuses = new java.util.ArrayList(other.jobStatuses.size()); for (org.apache.airavata.model.status.JobStatus other_element : other.jobStatuses) { __this__jobStatuses.add(new org.apache.airavata.model.status.JobStatus(other_element)); } @@ -296,11 +266,11 @@ public class JobModel implements org.apache.thrift.TBase(); + this.jobStatuses = new java.util.ArrayList(); } this.jobStatuses.add(elem); } - public List getJobStatuses() { + public java.util.List getJobStatuses() { return this.jobStatuses; } - public void setJobStatuses(List jobStatuses) { + public void setJobStatuses(java.util.List jobStatuses) { this.jobStatuses = jobStatuses; } @@ -448,11 +418,11 @@ public class JobModel implements org.apache.thrift.TBase)value); + setJobStatuses((java.util.List)value); } break; @@ -639,7 +609,7 @@ public class JobModel implements org.apache.thrift.TBase list = new ArrayList(); - - boolean present_jobId = true && (isSetJobId()); - list.add(present_jobId); - if (present_jobId) - list.add(jobId); - - boolean present_taskId = true && (isSetTaskId()); - list.add(present_taskId); - if (present_taskId) - list.add(taskId); - - boolean present_processId = true && (isSetProcessId()); - list.add(present_processId); - if (present_processId) - list.add(processId); - - boolean present_jobDescription = true && (isSetJobDescription()); - list.add(present_jobDescription); - if (present_jobDescription) - list.add(jobDescription); - - boolean present_creationTime = true && (isSetCreationTime()); - list.add(present_creationTime); - if (present_creationTime) - list.add(creationTime); - - boolean present_jobStatuses = true && (isSetJobStatuses()); - list.add(present_jobStatuses); - if (present_jobStatuses) - list.add(jobStatuses); - - boolean present_computeResourceConsumed = true && (isSetComputeResourceConsumed()); - list.add(present_computeResourceConsumed); - if (present_computeResourceConsumed) - list.add(computeResourceConsumed); - - boolean present_jobName = true && (isSetJobName()); - list.add(present_jobName); - if (present_jobName) - list.add(jobName); - - boolean present_workingDir = true && (isSetWorkingDir()); - list.add(present_workingDir); - if (present_workingDir) - list.add(workingDir); - - boolean present_stdOut = true && (isSetStdOut()); - list.add(present_stdOut); - if (present_stdOut) - list.add(stdOut); - - boolean present_stdErr = true && (isSetStdErr()); - list.add(present_stdErr); - if (present_stdErr) - list.add(stdErr); - - boolean present_exitCode = true && (isSetExitCode()); - list.add(present_exitCode); - if (present_exitCode) - list.add(exitCode); - - return list.hashCode(); + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetJobId()) ? 131071 : 524287); + if (isSetJobId()) + hashCode = hashCode * 8191 + jobId.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTaskId()) ? 131071 : 524287); + if (isSetTaskId()) + hashCode = hashCode * 8191 + taskId.hashCode(); + + hashCode = hashCode * 8191 + ((isSetProcessId()) ? 131071 : 524287); + if (isSetProcessId()) + hashCode = hashCode * 8191 + processId.hashCode(); + + hashCode = hashCode * 8191 + ((isSetJobDescription()) ? 131071 : 524287); + if (isSetJobDescription()) + hashCode = hashCode * 8191 + jobDescription.hashCode(); + + hashCode = hashCode * 8191 + ((isSetCreationTime()) ? 131071 : 524287); + if (isSetCreationTime()) + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(creationTime); + + hashCode = hashCode * 8191 + ((isSetJobStatuses()) ? 131071 : 524287); + if (isSetJobStatuses()) + hashCode = hashCode * 8191 + jobStatuses.hashCode(); + + hashCode = hashCode * 8191 + ((isSetComputeResourceConsumed()) ? 131071 : 524287); + if (isSetComputeResourceConsumed()) + hashCode = hashCode * 8191 + computeResourceConsumed.hashCode(); + + hashCode = hashCode * 8191 + ((isSetJobName()) ? 131071 : 524287); + if (isSetJobName()) + hashCode = hashCode * 8191 + jobName.hashCode(); + + hashCode = hashCode * 8191 + ((isSetWorkingDir()) ? 131071 : 524287); + if (isSetWorkingDir()) + hashCode = hashCode * 8191 + workingDir.hashCode(); + + hashCode = hashCode * 8191 + ((isSetStdOut()) ? 131071 : 524287); + if (isSetStdOut()) + hashCode = hashCode * 8191 + stdOut.hashCode(); + + hashCode = hashCode * 8191 + ((isSetStdErr()) ? 131071 : 524287); + if (isSetStdErr()) + hashCode = hashCode * 8191 + stdErr.hashCode(); + + hashCode = hashCode * 8191 + ((isSetExitCode()) ? 131071 : 524287); + if (isSetExitCode()) + hashCode = hashCode * 8191 + exitCode; + + return hashCode; } @Override @@ -962,7 +922,7 @@ public class JobModel implements org.apache.thrift.TBase { + private static class JobModelStandardScheme extends org.apache.thrift.scheme.StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, JobModel struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -1310,7 +1270,7 @@ public class JobModel implements org.apache.thrift.TBase(_list0.size); + struct.jobStatuses = new java.util.ArrayList(_list0.size); org.apache.airavata.model.status.JobStatus _elem1; for (int _i2 = 0; _i2 < _list0.size; ++_i2) { @@ -1471,22 +1431,22 @@ public class JobModel implements org.apache.thrift.TBase { + private static class JobModelTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, JobModel struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeString(struct.jobId); oprot.writeString(struct.taskId); oprot.writeString(struct.processId); oprot.writeString(struct.jobDescription); - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetCreationTime()) { optionals.set(0); } @@ -1546,7 +1506,7 @@ public class JobModel implements org.apache.thrift.TBase(_list5.size); + struct.jobStatuses = new java.util.ArrayList(_list5.size); org.apache.airavata.model.status.JobStatus _elem6; for (int _i7 = 0; _i7 < _list5.size; ++_i7) { @@ -1601,5 +1561,8 @@ public class JobModel implements org.apache.thrift.TBase S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } }