Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

downgrade hadoop to released version. add timezones to thrift proto.

  • Loading branch information...
commit f547ac29a90dc13bfa65c87dff204b0862a67204 1 parent 34a3611
David Blackman blackmad authored
142 interface/src/main/java/gen-java/com/foursquare/twofishes/GeocodeFeature.java
View
@@ -39,6 +39,7 @@
private static final TField IDS_FIELD_DESC = new TField("ids", TType.LIST, (short)6);
private static final TField NAMES_FIELD_DESC = new TField("names", TType.LIST, (short)7);
private static final TField ATTRIBUTION_FIELD_DESC = new TField("attribution", TType.LIST, (short)8);
+ private static final TField TIMEZONES_FIELD_DESC = new TField("timezones", TType.LIST, (short)9);
public String cc;
public FeatureGeometry geometry;
@@ -52,6 +53,7 @@
public List<FeatureId> ids;
public List<FeatureName> names;
public List<String> attribution;
+ public List<String> timezones;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
@@ -66,7 +68,8 @@
WOE_TYPE((short)5, "woeType"),
IDS((short)6, "ids"),
NAMES((short)7, "names"),
- ATTRIBUTION((short)8, "attribution");
+ ATTRIBUTION((short)8, "attribution"),
+ TIMEZONES((short)9, "timezones");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -97,6 +100,8 @@ public static _Fields findByThriftId(int fieldId) {
return NAMES;
case 8: // ATTRIBUTION
return ATTRIBUTION;
+ case 9: // TIMEZONES
+ return TIMEZONES;
default:
return null;
}
@@ -160,6 +165,9 @@ public String getFieldName() {
tmpMap.put(_Fields.ATTRIBUTION, new FieldMetaData("attribution", TFieldRequirementType.OPTIONAL,
new ListMetaData(TType.LIST,
new FieldValueMetaData(TType.STRING))));
+ tmpMap.put(_Fields.TIMEZONES, new FieldMetaData("timezones", TFieldRequirementType.OPTIONAL,
+ new ListMetaData(TType.LIST,
+ new FieldValueMetaData(TType.STRING))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(GeocodeFeature.class, metaDataMap);
}
@@ -216,6 +224,13 @@ public GeocodeFeature(GeocodeFeature other) {
}
this.attribution = __this__attribution;
}
+ if (other.isSetTimezones()) {
+ List<String> __this__timezones = new ArrayList<String>();
+ for (String other_element : other.timezones) {
+ __this__timezones.add(other_element);
+ }
+ this.timezones = __this__timezones;
+ }
}
public GeocodeFeature deepCopy() {
@@ -232,6 +247,7 @@ public void clear() {
this.ids = null;
this.names = null;
this.attribution = null;
+ this.timezones = null;
}
public String getCc() {
@@ -479,6 +495,45 @@ public void setAttributionIsSet(boolean value) {
}
}
+ public int getTimezonesSize() {
+ return (this.timezones == null) ? 0 : this.timezones.size();
+ }
+
+ public java.util.Iterator<String> getTimezonesIterator() {
+ return (this.timezones == null) ? null : this.timezones.iterator();
+ }
+
+ public void addToTimezones(String elem) {
+ if (this.timezones == null) {
+ this.timezones = new ArrayList<String>();
+ }
+ this.timezones.add(elem);
+ }
+
+ public List<String> getTimezones() {
+ return this.timezones;
+ }
+
+ public GeocodeFeature setTimezones(List<String> timezones) {
+ this.timezones = timezones;
+ return this;
+ }
+
+ public void unsetTimezones() {
+ this.timezones = null;
+ }
+
+ /** Returns true if field timezones is set (has been asigned a value) and false otherwise */
+ public boolean isSetTimezones() {
+ return this.timezones != null;
+ }
+
+ public void setTimezonesIsSet(boolean value) {
+ if (!value) {
+ this.timezones = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case CC:
@@ -545,6 +600,14 @@ public void setFieldValue(_Fields field, Object value) {
}
break;
+ case TIMEZONES:
+ if (value == null) {
+ unsetTimezones();
+ } else {
+ setTimezones((List<String>)value);
+ }
+ break;
+
}
}
@@ -574,6 +637,9 @@ public Object getFieldValue(_Fields field) {
case ATTRIBUTION:
return getAttribution();
+ case TIMEZONES:
+ return getTimezones();
+
}
throw new IllegalStateException();
}
@@ -601,6 +667,8 @@ public boolean isSet(_Fields field) {
return isSetNames();
case ATTRIBUTION:
return isSetAttribution();
+ case TIMEZONES:
+ return isSetTimezones();
}
throw new IllegalStateException();
}
@@ -690,6 +758,15 @@ public boolean equals(GeocodeFeature that) {
return false;
}
+ boolean this_present_timezones = true && this.isSetTimezones();
+ boolean that_present_timezones = true && that.isSetTimezones();
+ if (this_present_timezones || that_present_timezones) {
+ if (!(this_present_timezones && that_present_timezones))
+ return false;
+ if (!this.timezones.equals(that.timezones))
+ return false;
+ }
+
return true;
}
@@ -786,6 +863,16 @@ public int compareTo(GeocodeFeature other) {
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetTimezones()).compareTo(typedOther.isSetTimezones());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTimezones()) {
+ lastComparison = TBaseHelper.compareTo(this.timezones, typedOther.timezones);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -892,6 +979,23 @@ public void read(TProtocol iprot) throws TException {
TProtocolUtil.skip(iprot, field.type);
}
break;
+ case 9: // TIMEZONES
+ if (field.type == TType.LIST) {
+ {
+ TList _list17 = iprot.readListBegin();
+ this.timezones = new ArrayList<String>(_list17.size);
+ for (int _i18 = 0; _i18 < _list17.size; ++_i18)
+ {
+ String _elem19;
+ _elem19 = iprot.readString();
+ this.timezones.add(_elem19);
+ }
+ iprot.readListEnd();
+ }
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
default:
TProtocolUtil.skip(iprot, field.type);
}
@@ -943,9 +1047,9 @@ public void write(TProtocol oprot) throws TException {
oprot.writeFieldBegin(IDS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRUCT, this.ids.size()));
- for (FeatureId _iter17 : this.ids)
+ for (FeatureId _iter20 : this.ids)
{
- _iter17.write(oprot);
+ _iter20.write(oprot);
}
oprot.writeListEnd();
}
@@ -957,9 +1061,9 @@ public void write(TProtocol oprot) throws TException {
oprot.writeFieldBegin(NAMES_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRUCT, this.names.size()));
- for (FeatureName _iter18 : this.names)
+ for (FeatureName _iter21 : this.names)
{
- _iter18.write(oprot);
+ _iter21.write(oprot);
}
oprot.writeListEnd();
}
@@ -971,9 +1075,23 @@ public void write(TProtocol oprot) throws TException {
oprot.writeFieldBegin(ATTRIBUTION_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRING, this.attribution.size()));
- for (String _iter19 : this.attribution)
+ for (String _iter22 : this.attribution)
+ {
+ oprot.writeString(_iter22);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (this.timezones != null) {
+ if (isSetTimezones()) {
+ oprot.writeFieldBegin(TIMEZONES_FIELD_DESC);
+ {
+ oprot.writeListBegin(new TList(TType.STRING, this.timezones.size()));
+ for (String _iter23 : this.timezones)
{
- oprot.writeString(_iter19);
+ oprot.writeString(_iter23);
}
oprot.writeListEnd();
}
@@ -1064,6 +1182,16 @@ public String toString() {
}
first = false;
}
+ if (isSetTimezones()) {
+ if (!first) sb.append(", ");
+ sb.append("timezones:");
+ if (this.timezones == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.timezones);
+ }
+ first = false;
+ }
sb.append(")");
return sb.toString();
}
18 interface/src/main/java/gen-java/com/foursquare/twofishes/GeocodeInterpretation.java
View
@@ -506,14 +506,14 @@ public void read(TProtocol iprot) throws TException {
case 4: // PARENTS
if (field.type == TType.LIST) {
{
- TList _list20 = iprot.readListBegin();
- this.parents = new ArrayList<GeocodeFeature>(_list20.size);
- for (int _i21 = 0; _i21 < _list20.size; ++_i21)
+ TList _list24 = iprot.readListBegin();
+ this.parents = new ArrayList<GeocodeFeature>(_list24.size);
+ for (int _i25 = 0; _i25 < _list24.size; ++_i25)
{
- GeocodeFeature _elem22;
- _elem22 = new GeocodeFeature();
- _elem22.read(iprot);
- this.parents.add(_elem22);
+ GeocodeFeature _elem26;
+ _elem26 = new GeocodeFeature();
+ _elem26.read(iprot);
+ this.parents.add(_elem26);
}
iprot.readListEnd();
}
@@ -556,9 +556,9 @@ public void write(TProtocol oprot) throws TException {
oprot.writeFieldBegin(PARENTS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRUCT, this.parents.size()));
- for (GeocodeFeature _iter23 : this.parents)
+ for (GeocodeFeature _iter27 : this.parents)
{
- _iter23.write(oprot);
+ _iter27.write(oprot);
}
oprot.writeListEnd();
}
18 interface/src/main/java/gen-java/com/foursquare/twofishes/GeocodeResponse.java
View
@@ -279,14 +279,14 @@ public void read(TProtocol iprot) throws TException {
case 1: // INTERPRETATIONS
if (field.type == TType.LIST) {
{
- TList _list24 = iprot.readListBegin();
- this.interpretations = new ArrayList<GeocodeInterpretation>(_list24.size);
- for (int _i25 = 0; _i25 < _list24.size; ++_i25)
+ TList _list28 = iprot.readListBegin();
+ this.interpretations = new ArrayList<GeocodeInterpretation>(_list28.size);
+ for (int _i29 = 0; _i29 < _list28.size; ++_i29)
{
- GeocodeInterpretation _elem26;
- _elem26 = new GeocodeInterpretation();
- _elem26.read(iprot);
- this.interpretations.add(_elem26);
+ GeocodeInterpretation _elem30;
+ _elem30 = new GeocodeInterpretation();
+ _elem30.read(iprot);
+ this.interpretations.add(_elem30);
}
iprot.readListEnd();
}
@@ -313,9 +313,9 @@ public void write(TProtocol oprot) throws TException {
oprot.writeFieldBegin(INTERPRETATIONS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRUCT, this.interpretations.size()));
- for (GeocodeInterpretation _iter27 : this.interpretations)
+ for (GeocodeInterpretation _iter31 : this.interpretations)
{
- _iter27.write(oprot);
+ _iter31.write(oprot);
}
oprot.writeListEnd();
}
1  interface/src/main/thrift/geocoder.thrift
View
@@ -81,6 +81,7 @@ struct GeocodeFeature {
6: optional list<FeatureId> ids,
7: optional list<FeatureName> names,
8: optional list<string> attribution,
+ 9: optional list<string> timezones
}
struct GeocodeServingFeature {
8 project/GeocoderBuild.scala
View
@@ -81,14 +81,12 @@ object GeocoderBuild extends Build {
"com.twitter" % "util-core_2.9.1" % "1.12.8",
"com.twitter" % "util-logging_2.9.1" % "1.12.8",
"org.slf4j" % "slf4j-api" % "1.6.1",
- "org.apache.hadoop" % "hadoop-core" % "0.20.2-cdh3u3b",
- "org.apache.hbase" % "hbase" % "0.92.0-cdh4b1"
+ "org.apache.hadoop" % "hadoop-core" % "0.20.2-cdh3u3",
+ "org.apache.hbase" % "hbase" % "0.90.4-cdh3u3"
),
ivyXML := (
<dependencies>
- <exclude org="org.mongodb" name="mongo-java-driver"/>
- <exclude org="org.mortbay.jetty" name="jetty"/>
- <exclude org="org.apache.avro" name="avro-ipc"/>
+ <exclude org="org.apache.thrift"/>
</dependencies>
)
)
Please sign in to comment.
Something went wrong with that request. Please try again.