You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gora.apache.org by rm...@apache.org on 2014/04/12 21:21:56 UTC
svn commit: r1586888 [10/10] - in /gora/trunk: ./ bin/ gora-accumulo/
gora-accumulo/src/main/java/org/apache/gora/accumulo/encoders/
gora-accumulo/src/main/java/org/apache/gora/accumulo/query/
gora-accumulo/src/main/java/org/apache/gora/accumulo/store/...
Modified: gora/trunk/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/Pageview.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/Pageview.java?rev=1586888&r1=1586887&r2=1586888&view=diff
==============================================================================
--- gora/trunk/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/Pageview.java (original)
+++ gora/trunk/gora-tutorial/src/main/java/org/apache/gora/tutorial/log/generated/Pageview.java Sat Apr 12 19:21:53 2014
@@ -1,161 +1,769 @@
/**
- *Licensed to the Apache Software Foundation (ASF) under one
- *or more contributor license agreements. See the NOTICE file
- *distributed with this work for additional information
- *regarding copyright ownership. The ASF licenses this file
- *to you under the Apache License, Version 2.0 (the"
- *License"); you may not use this file except in compliance
- *with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Autogenerated by Avro
*
- *Unless required by applicable law or agreed to in writing, software
- *distributed under the License is distributed on an "AS IS" BASIS,
- *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *See the License for the specific language governing permissions and
- *limitations under the License.
+ * DO NOT EDIT DIRECTLY
*/
-
-package org.apache.gora.tutorial.log.generated;
-
-import java.nio.ByteBuffer;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.avro.Protocol;
-import org.apache.avro.Schema;
-import org.apache.avro.AvroRuntimeException;
-import org.apache.avro.Protocol;
-import org.apache.avro.util.Utf8;
-import org.apache.avro.ipc.AvroRemoteException;
-import org.apache.avro.generic.GenericArray;
-import org.apache.avro.specific.FixedSize;
-import org.apache.avro.specific.SpecificExceptionBase;
-import org.apache.avro.specific.SpecificRecordBase;
-import org.apache.avro.specific.SpecificRecord;
-import org.apache.avro.specific.SpecificFixed;
-import org.apache.gora.persistency.StateManager;
-import org.apache.gora.persistency.impl.PersistentBase;
-import org.apache.gora.persistency.impl.StateManagerImpl;
-import org.apache.gora.persistency.StatefulHashMap;
-import org.apache.gora.persistency.ListGenericArray;
-
+package org.apache.gora.tutorial.log.generated;
@SuppressWarnings("all")
-public class Pageview extends PersistentBase {
- public static final Schema _SCHEMA = Schema.parse("{\"type\":\"record\",\"name\":\"Pageview\",\"namespace\":\"org.apache.gora.tutorial.log.generated\",\"fields\":[{\"name\":\"url\",\"type\":\"string\"},{\"name\":\"timestamp\",\"type\":\"long\"},{\"name\":\"ip\",\"type\":\"string\"},{\"name\":\"httpMethod\",\"type\":\"string\"},{\"name\":\"httpStatusCode\",\"type\":\"int\"},{\"name\":\"responseSize\",\"type\":\"int\"},{\"name\":\"referrer\",\"type\":\"string\"},{\"name\":\"userAgent\",\"type\":\"string\"}]}");
- public static enum Field {
- URL(0,"url"),
- TIMESTAMP(1,"timestamp"),
- IP(2,"ip"),
- HTTP_METHOD(3,"httpMethod"),
- HTTP_STATUS_CODE(4,"httpStatusCode"),
- RESPONSE_SIZE(5,"responseSize"),
- REFERRER(6,"referrer"),
- USER_AGENT(7,"userAgent"),
- ;
- private int index;
- private String name;
- Field(int index, String name) {this.index=index;this.name=name;}
- public int getIndex() {return index;}
- public String getName() {return name;}
- public String toString() {return name;}
- };
- public static final String[] _ALL_FIELDS = {"url","timestamp","ip","httpMethod","httpStatusCode","responseSize","referrer","userAgent",};
- static {
- PersistentBase.registerFields(Pageview.class, _ALL_FIELDS);
- }
- private Utf8 url;
+public class Pageview extends org.apache.gora.persistency.impl.PersistentBase implements org.apache.avro.specific.SpecificRecord, org.apache.gora.persistency.Persistent {
+ public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"Pageview\",\"namespace\":\"org.apache.gora.tutorial.log.generated\",\"fields\":[{\"name\":\"__g__dirty\",\"type\":\"bytes\",\"doc\":\"Bytes used to represent weather or not a field is dirty.\",\"default\":\"AAA=\"},{\"name\":\"url\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"timestamp\",\"type\":\"long\",\"default\":0},{\"name\":\"ip\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"httpMethod\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"httpStatusCode\",\"type\":\"int\",\"default\":0},{\"name\":\"responseSize\",\"type\":\"int\",\"default\":0},{\"name\":\"referrer\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"userAgent\",\"type\":[\"null\",\"string\"],\"default\":null}]}");
+ /** Bytes used to represent weather or not a field is dirty. */
+ private java.nio.ByteBuffer __g__dirty = java.nio.ByteBuffer.wrap(new byte[2]);
+ private java.lang.CharSequence url;
private long timestamp;
- private Utf8 ip;
- private Utf8 httpMethod;
+ private java.lang.CharSequence ip;
+ private java.lang.CharSequence httpMethod;
private int httpStatusCode;
private int responseSize;
- private Utf8 referrer;
- private Utf8 userAgent;
- public Pageview() {
- this(new StateManagerImpl());
- }
- public Pageview(StateManager stateManager) {
- super(stateManager);
- }
- public Pageview newInstance(StateManager stateManager) {
- return new Pageview(stateManager);
- }
- public Schema getSchema() { return _SCHEMA; }
- public Object get(int _field) {
- switch (_field) {
- case 0: return url;
- case 1: return timestamp;
- case 2: return ip;
- case 3: return httpMethod;
- case 4: return httpStatusCode;
- case 5: return responseSize;
- case 6: return referrer;
- case 7: return userAgent;
- default: throw new AvroRuntimeException("Bad index");
+ private java.lang.CharSequence referrer;
+ private java.lang.CharSequence userAgent;
+ public org.apache.avro.Schema getSchema() { return SCHEMA$; }
+ // Used by DatumWriter. Applications should not call.
+ public java.lang.Object get(int field$) {
+ switch (field$) {
+ case 0: return __g__dirty;
+ case 1: return url;
+ case 2: return timestamp;
+ case 3: return ip;
+ case 4: return httpMethod;
+ case 5: return httpStatusCode;
+ case 6: return responseSize;
+ case 7: return referrer;
+ case 8: return userAgent;
+ default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
+
+ // Used by DatumReader. Applications should not call.
@SuppressWarnings(value="unchecked")
- public void put(int _field, Object _value) {
- if(isFieldEqual(_field, _value)) return;
- getStateManager().setDirty(this, _field);
- switch (_field) {
- case 0:url = (Utf8)_value; break;
- case 1:timestamp = (Long)_value; break;
- case 2:ip = (Utf8)_value; break;
- case 3:httpMethod = (Utf8)_value; break;
- case 4:httpStatusCode = (Integer)_value; break;
- case 5:responseSize = (Integer)_value; break;
- case 6:referrer = (Utf8)_value; break;
- case 7:userAgent = (Utf8)_value; break;
- default: throw new AvroRuntimeException("Bad index");
+ public void put(int field$, java.lang.Object value) {
+ switch (field$) {
+ case 0: __g__dirty = (java.nio.ByteBuffer)(value); break;
+ case 1: url = (java.lang.CharSequence)(value); break;
+ case 2: timestamp = (java.lang.Long)(value); break;
+ case 3: ip = (java.lang.CharSequence)(value); break;
+ case 4: httpMethod = (java.lang.CharSequence)(value); break;
+ case 5: httpStatusCode = (java.lang.Integer)(value); break;
+ case 6: responseSize = (java.lang.Integer)(value); break;
+ case 7: referrer = (java.lang.CharSequence)(value); break;
+ case 8: userAgent = (java.lang.CharSequence)(value); break;
+ default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
- public Utf8 getUrl() {
- return (Utf8) get(0);
+
+ /**
+ * Gets the value of the 'url' field.
+ */
+ public java.lang.CharSequence getUrl() {
+ return url;
}
- public void setUrl(Utf8 value) {
- put(0, value);
+
+ /**
+ * Sets the value of the 'url' field.
+ * @param value the value to set.
+ */
+ public void setUrl(java.lang.CharSequence value) {
+ this.url = value;
+ setDirty(1);
+ }
+
+ /**
+ * Checks the dirty status of the 'url' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isUrlDirty(java.lang.CharSequence value) {
+ return isDirty(1);
}
- public long getTimestamp() {
- return (Long) get(1);
+
+ /**
+ * Gets the value of the 'timestamp' field.
+ */
+ public java.lang.Long getTimestamp() {
+ return timestamp;
}
- public void setTimestamp(long value) {
- put(1, value);
+
+ /**
+ * Sets the value of the 'timestamp' field.
+ * @param value the value to set.
+ */
+ public void setTimestamp(java.lang.Long value) {
+ this.timestamp = value;
+ setDirty(2);
+ }
+
+ /**
+ * Checks the dirty status of the 'timestamp' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isTimestampDirty(java.lang.Long value) {
+ return isDirty(2);
}
- public Utf8 getIp() {
- return (Utf8) get(2);
+
+ /**
+ * Gets the value of the 'ip' field.
+ */
+ public java.lang.CharSequence getIp() {
+ return ip;
}
- public void setIp(Utf8 value) {
- put(2, value);
+
+ /**
+ * Sets the value of the 'ip' field.
+ * @param value the value to set.
+ */
+ public void setIp(java.lang.CharSequence value) {
+ this.ip = value;
+ setDirty(3);
+ }
+
+ /**
+ * Checks the dirty status of the 'ip' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isIpDirty(java.lang.CharSequence value) {
+ return isDirty(3);
}
- public Utf8 getHttpMethod() {
- return (Utf8) get(3);
+
+ /**
+ * Gets the value of the 'httpMethod' field.
+ */
+ public java.lang.CharSequence getHttpMethod() {
+ return httpMethod;
}
- public void setHttpMethod(Utf8 value) {
- put(3, value);
+
+ /**
+ * Sets the value of the 'httpMethod' field.
+ * @param value the value to set.
+ */
+ public void setHttpMethod(java.lang.CharSequence value) {
+ this.httpMethod = value;
+ setDirty(4);
+ }
+
+ /**
+ * Checks the dirty status of the 'httpMethod' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isHttpMethodDirty(java.lang.CharSequence value) {
+ return isDirty(4);
}
- public int getHttpStatusCode() {
- return (Integer) get(4);
+
+ /**
+ * Gets the value of the 'httpStatusCode' field.
+ */
+ public java.lang.Integer getHttpStatusCode() {
+ return httpStatusCode;
}
- public void setHttpStatusCode(int value) {
- put(4, value);
+
+ /**
+ * Sets the value of the 'httpStatusCode' field.
+ * @param value the value to set.
+ */
+ public void setHttpStatusCode(java.lang.Integer value) {
+ this.httpStatusCode = value;
+ setDirty(5);
+ }
+
+ /**
+ * Checks the dirty status of the 'httpStatusCode' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isHttpStatusCodeDirty(java.lang.Integer value) {
+ return isDirty(5);
}
- public int getResponseSize() {
- return (Integer) get(5);
+
+ /**
+ * Gets the value of the 'responseSize' field.
+ */
+ public java.lang.Integer getResponseSize() {
+ return responseSize;
}
- public void setResponseSize(int value) {
- put(5, value);
+
+ /**
+ * Sets the value of the 'responseSize' field.
+ * @param value the value to set.
+ */
+ public void setResponseSize(java.lang.Integer value) {
+ this.responseSize = value;
+ setDirty(6);
+ }
+
+ /**
+ * Checks the dirty status of the 'responseSize' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isResponseSizeDirty(java.lang.Integer value) {
+ return isDirty(6);
}
- public Utf8 getReferrer() {
- return (Utf8) get(6);
+
+ /**
+ * Gets the value of the 'referrer' field.
+ */
+ public java.lang.CharSequence getReferrer() {
+ return referrer;
+ }
+
+ /**
+ * Sets the value of the 'referrer' field.
+ * @param value the value to set.
+ */
+ public void setReferrer(java.lang.CharSequence value) {
+ this.referrer = value;
+ setDirty(7);
+ }
+
+ /**
+ * Checks the dirty status of the 'referrer' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isReferrerDirty(java.lang.CharSequence value) {
+ return isDirty(7);
+ }
+
+ /**
+ * Gets the value of the 'userAgent' field.
+ */
+ public java.lang.CharSequence getUserAgent() {
+ return userAgent;
+ }
+
+ /**
+ * Sets the value of the 'userAgent' field.
+ * @param value the value to set.
+ */
+ public void setUserAgent(java.lang.CharSequence value) {
+ this.userAgent = value;
+ setDirty(8);
+ }
+
+ /**
+ * Checks the dirty status of the 'userAgent' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isUserAgentDirty(java.lang.CharSequence value) {
+ return isDirty(8);
+ }
+
+ /** Creates a new Pageview RecordBuilder */
+ public static org.apache.gora.tutorial.log.generated.Pageview.Builder newBuilder() {
+ return new org.apache.gora.tutorial.log.generated.Pageview.Builder();
+ }
+
+ /** Creates a new Pageview RecordBuilder by copying an existing Builder */
+ public static org.apache.gora.tutorial.log.generated.Pageview.Builder newBuilder(org.apache.gora.tutorial.log.generated.Pageview.Builder other) {
+ return new org.apache.gora.tutorial.log.generated.Pageview.Builder(other);
+ }
+
+ /** Creates a new Pageview RecordBuilder by copying an existing Pageview instance */
+ public static org.apache.gora.tutorial.log.generated.Pageview.Builder newBuilder(org.apache.gora.tutorial.log.generated.Pageview other) {
+ return new org.apache.gora.tutorial.log.generated.Pageview.Builder(other);
+ }
+
+ private static java.nio.ByteBuffer deepCopyToWriteOnlyBuffer(
+ java.nio.ByteBuffer input) {
+ java.nio.ByteBuffer copy = java.nio.ByteBuffer.allocate(input.capacity());
+ int position = input.position();
+ input.reset();
+ int mark = input.position();
+ int limit = input.limit();
+ input.rewind();
+ input.limit(input.capacity());
+ copy.put(input);
+ input.rewind();
+ copy.rewind();
+ input.position(mark);
+ input.mark();
+ copy.position(mark);
+ copy.mark();
+ input.position(position);
+ copy.position(position);
+ input.limit(limit);
+ copy.limit(limit);
+ return copy.asReadOnlyBuffer();
+ }
+
+ /**
+ * RecordBuilder for Pageview instances.
+ */
+ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<Pageview>
+ implements org.apache.avro.data.RecordBuilder<Pageview> {
+
+ private java.nio.ByteBuffer __g__dirty;
+ private java.lang.CharSequence url;
+ private long timestamp;
+ private java.lang.CharSequence ip;
+ private java.lang.CharSequence httpMethod;
+ private int httpStatusCode;
+ private int responseSize;
+ private java.lang.CharSequence referrer;
+ private java.lang.CharSequence userAgent;
+
+ /** Creates a new Builder */
+ private Builder() {
+ super(org.apache.gora.tutorial.log.generated.Pageview.SCHEMA$);
+ }
+
+ /** Creates a Builder by copying an existing Builder */
+ private Builder(org.apache.gora.tutorial.log.generated.Pageview.Builder other) {
+ super(other);
+ }
+
+ /** Creates a Builder by copying an existing Pageview instance */
+ private Builder(org.apache.gora.tutorial.log.generated.Pageview other) {
+ super(org.apache.gora.tutorial.log.generated.Pageview.SCHEMA$);
+ if (isValidValue(fields()[0], other.__g__dirty)) {
+ this.__g__dirty = (java.nio.ByteBuffer) data().deepCopy(fields()[0].schema(), other.__g__dirty);
+ fieldSetFlags()[0] = true;
+ }
+ if (isValidValue(fields()[1], other.url)) {
+ this.url = (java.lang.CharSequence) data().deepCopy(fields()[1].schema(), other.url);
+ fieldSetFlags()[1] = true;
+ }
+ if (isValidValue(fields()[2], other.timestamp)) {
+ this.timestamp = (java.lang.Long) data().deepCopy(fields()[2].schema(), other.timestamp);
+ fieldSetFlags()[2] = true;
+ }
+ if (isValidValue(fields()[3], other.ip)) {
+ this.ip = (java.lang.CharSequence) data().deepCopy(fields()[3].schema(), other.ip);
+ fieldSetFlags()[3] = true;
+ }
+ if (isValidValue(fields()[4], other.httpMethod)) {
+ this.httpMethod = (java.lang.CharSequence) data().deepCopy(fields()[4].schema(), other.httpMethod);
+ fieldSetFlags()[4] = true;
+ }
+ if (isValidValue(fields()[5], other.httpStatusCode)) {
+ this.httpStatusCode = (java.lang.Integer) data().deepCopy(fields()[5].schema(), other.httpStatusCode);
+ fieldSetFlags()[5] = true;
+ }
+ if (isValidValue(fields()[6], other.responseSize)) {
+ this.responseSize = (java.lang.Integer) data().deepCopy(fields()[6].schema(), other.responseSize);
+ fieldSetFlags()[6] = true;
+ }
+ if (isValidValue(fields()[7], other.referrer)) {
+ this.referrer = (java.lang.CharSequence) data().deepCopy(fields()[7].schema(), other.referrer);
+ fieldSetFlags()[7] = true;
+ }
+ if (isValidValue(fields()[8], other.userAgent)) {
+ this.userAgent = (java.lang.CharSequence) data().deepCopy(fields()[8].schema(), other.userAgent);
+ fieldSetFlags()[8] = true;
+ }
+ }
+
+ /** Gets the value of the 'url' field */
+ public java.lang.CharSequence getUrl() {
+ return url;
+ }
+
+ /** Sets the value of the 'url' field */
+ public org.apache.gora.tutorial.log.generated.Pageview.Builder setUrl(java.lang.CharSequence value) {
+ validate(fields()[1], value);
+ this.url = value;
+ fieldSetFlags()[1] = true;
+ return this;
+ }
+
+ /** Checks whether the 'url' field has been set */
+ public boolean hasUrl() {
+ return fieldSetFlags()[1];
+ }
+
+ /** Clears the value of the 'url' field */
+ public org.apache.gora.tutorial.log.generated.Pageview.Builder clearUrl() {
+ url = null;
+ fieldSetFlags()[1] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'timestamp' field */
+ public java.lang.Long getTimestamp() {
+ return timestamp;
+ }
+
+ /** Sets the value of the 'timestamp' field */
+ public org.apache.gora.tutorial.log.generated.Pageview.Builder setTimestamp(long value) {
+ validate(fields()[2], value);
+ this.timestamp = value;
+ fieldSetFlags()[2] = true;
+ return this;
+ }
+
+ /** Checks whether the 'timestamp' field has been set */
+ public boolean hasTimestamp() {
+ return fieldSetFlags()[2];
+ }
+
+ /** Clears the value of the 'timestamp' field */
+ public org.apache.gora.tutorial.log.generated.Pageview.Builder clearTimestamp() {
+ fieldSetFlags()[2] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'ip' field */
+ public java.lang.CharSequence getIp() {
+ return ip;
+ }
+
+ /** Sets the value of the 'ip' field */
+ public org.apache.gora.tutorial.log.generated.Pageview.Builder setIp(java.lang.CharSequence value) {
+ validate(fields()[3], value);
+ this.ip = value;
+ fieldSetFlags()[3] = true;
+ return this;
+ }
+
+ /** Checks whether the 'ip' field has been set */
+ public boolean hasIp() {
+ return fieldSetFlags()[3];
+ }
+
+ /** Clears the value of the 'ip' field */
+ public org.apache.gora.tutorial.log.generated.Pageview.Builder clearIp() {
+ ip = null;
+ fieldSetFlags()[3] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'httpMethod' field */
+ public java.lang.CharSequence getHttpMethod() {
+ return httpMethod;
+ }
+
+ /** Sets the value of the 'httpMethod' field */
+ public org.apache.gora.tutorial.log.generated.Pageview.Builder setHttpMethod(java.lang.CharSequence value) {
+ validate(fields()[4], value);
+ this.httpMethod = value;
+ fieldSetFlags()[4] = true;
+ return this;
+ }
+
+ /** Checks whether the 'httpMethod' field has been set */
+ public boolean hasHttpMethod() {
+ return fieldSetFlags()[4];
+ }
+
+ /** Clears the value of the 'httpMethod' field */
+ public org.apache.gora.tutorial.log.generated.Pageview.Builder clearHttpMethod() {
+ httpMethod = null;
+ fieldSetFlags()[4] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'httpStatusCode' field */
+ public java.lang.Integer getHttpStatusCode() {
+ return httpStatusCode;
+ }
+
+ /** Sets the value of the 'httpStatusCode' field */
+ public org.apache.gora.tutorial.log.generated.Pageview.Builder setHttpStatusCode(int value) {
+ validate(fields()[5], value);
+ this.httpStatusCode = value;
+ fieldSetFlags()[5] = true;
+ return this;
+ }
+
+ /** Checks whether the 'httpStatusCode' field has been set */
+ public boolean hasHttpStatusCode() {
+ return fieldSetFlags()[5];
+ }
+
+ /** Clears the value of the 'httpStatusCode' field */
+ public org.apache.gora.tutorial.log.generated.Pageview.Builder clearHttpStatusCode() {
+ fieldSetFlags()[5] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'responseSize' field */
+ public java.lang.Integer getResponseSize() {
+ return responseSize;
+ }
+
+ /** Sets the value of the 'responseSize' field */
+ public org.apache.gora.tutorial.log.generated.Pageview.Builder setResponseSize(int value) {
+ validate(fields()[6], value);
+ this.responseSize = value;
+ fieldSetFlags()[6] = true;
+ return this;
+ }
+
+ /** Checks whether the 'responseSize' field has been set */
+ public boolean hasResponseSize() {
+ return fieldSetFlags()[6];
+ }
+
+ /** Clears the value of the 'responseSize' field */
+ public org.apache.gora.tutorial.log.generated.Pageview.Builder clearResponseSize() {
+ fieldSetFlags()[6] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'referrer' field */
+ public java.lang.CharSequence getReferrer() {
+ return referrer;
+ }
+
+ /** Sets the value of the 'referrer' field */
+ public org.apache.gora.tutorial.log.generated.Pageview.Builder setReferrer(java.lang.CharSequence value) {
+ validate(fields()[7], value);
+ this.referrer = value;
+ fieldSetFlags()[7] = true;
+ return this;
+ }
+
+ /** Checks whether the 'referrer' field has been set */
+ public boolean hasReferrer() {
+ return fieldSetFlags()[7];
+ }
+
+ /** Clears the value of the 'referrer' field */
+ public org.apache.gora.tutorial.log.generated.Pageview.Builder clearReferrer() {
+ referrer = null;
+ fieldSetFlags()[7] = false;
+ return this;
+ }
+
+ /** Gets the value of the 'userAgent' field */
+ public java.lang.CharSequence getUserAgent() {
+ return userAgent;
+ }
+
+ /** Sets the value of the 'userAgent' field */
+ public org.apache.gora.tutorial.log.generated.Pageview.Builder setUserAgent(java.lang.CharSequence value) {
+ validate(fields()[8], value);
+ this.userAgent = value;
+ fieldSetFlags()[8] = true;
+ return this;
+ }
+
+ /** Checks whether the 'userAgent' field has been set */
+ public boolean hasUserAgent() {
+ return fieldSetFlags()[8];
+ }
+
+ /** Clears the value of the 'userAgent' field */
+ public org.apache.gora.tutorial.log.generated.Pageview.Builder clearUserAgent() {
+ userAgent = null;
+ fieldSetFlags()[8] = false;
+ return this;
+ }
+
+ @Override
+ public Pageview build() {
+ try {
+ Pageview record = new Pageview();
+ record.__g__dirty = fieldSetFlags()[0] ? this.__g__dirty : (java.nio.ByteBuffer) java.nio.ByteBuffer.wrap(new byte[2]);
+ record.url = fieldSetFlags()[1] ? this.url : (java.lang.CharSequence) defaultValue(fields()[1]);
+ record.timestamp = fieldSetFlags()[2] ? this.timestamp : (java.lang.Long) defaultValue(fields()[2]);
+ record.ip = fieldSetFlags()[3] ? this.ip : (java.lang.CharSequence) defaultValue(fields()[3]);
+ record.httpMethod = fieldSetFlags()[4] ? this.httpMethod : (java.lang.CharSequence) defaultValue(fields()[4]);
+ record.httpStatusCode = fieldSetFlags()[5] ? this.httpStatusCode : (java.lang.Integer) defaultValue(fields()[5]);
+ record.responseSize = fieldSetFlags()[6] ? this.responseSize : (java.lang.Integer) defaultValue(fields()[6]);
+ record.referrer = fieldSetFlags()[7] ? this.referrer : (java.lang.CharSequence) defaultValue(fields()[7]);
+ record.userAgent = fieldSetFlags()[8] ? this.userAgent : (java.lang.CharSequence) defaultValue(fields()[8]);
+ return record;
+ } catch (Exception e) {
+ throw new org.apache.avro.AvroRuntimeException(e);
+ }
+ }
}
- public void setReferrer(Utf8 value) {
- put(6, value);
+
+ public Pageview.Tombstone getTombstone(){
+ return TOMBSTONE;
}
- public Utf8 getUserAgent() {
- return (Utf8) get(7);
+
+ public Pageview newInstance(){
+ return newBuilder().build();
}
- public void setUserAgent(Utf8 value) {
- put(7, value);
+
+ private static final Tombstone TOMBSTONE = new Tombstone();
+
+ public static final class Tombstone extends Pageview implements org.apache.gora.persistency.Tombstone {
+
+ private Tombstone() { }
+
+ /**
+ * Gets the value of the 'url' field.
+ */
+ public java.lang.CharSequence getUrl() {
+ throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'url' field.
+ * @param value the value to set.
+ */
+ public void setUrl(java.lang.CharSequence value) {
+ throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'url' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isUrlDirty(java.lang.CharSequence value) {
+ throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'timestamp' field.
+ */
+ public java.lang.Long getTimestamp() {
+ throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'timestamp' field.
+ * @param value the value to set.
+ */
+ public void setTimestamp(java.lang.Long value) {
+ throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'timestamp' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isTimestampDirty(java.lang.Long value) {
+ throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'ip' field.
+ */
+ public java.lang.CharSequence getIp() {
+ throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'ip' field.
+ * @param value the value to set.
+ */
+ public void setIp(java.lang.CharSequence value) {
+ throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'ip' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isIpDirty(java.lang.CharSequence value) {
+ throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'httpMethod' field.
+ */
+ public java.lang.CharSequence getHttpMethod() {
+ throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'httpMethod' field.
+ * @param value the value to set.
+ */
+ public void setHttpMethod(java.lang.CharSequence value) {
+ throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'httpMethod' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isHttpMethodDirty(java.lang.CharSequence value) {
+ throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'httpStatusCode' field.
+ */
+ public java.lang.Integer getHttpStatusCode() {
+ throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'httpStatusCode' field.
+ * @param value the value to set.
+ */
+ public void setHttpStatusCode(java.lang.Integer value) {
+ throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'httpStatusCode' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isHttpStatusCodeDirty(java.lang.Integer value) {
+ throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'responseSize' field.
+ */
+ public java.lang.Integer getResponseSize() {
+ throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'responseSize' field.
+ * @param value the value to set.
+ */
+ public void setResponseSize(java.lang.Integer value) {
+ throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'responseSize' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isResponseSizeDirty(java.lang.Integer value) {
+ throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'referrer' field.
+ */
+ public java.lang.CharSequence getReferrer() {
+ throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'referrer' field.
+ * @param value the value to set.
+ */
+ public void setReferrer(java.lang.CharSequence value) {
+ throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'referrer' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isReferrerDirty(java.lang.CharSequence value) {
+ throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'userAgent' field.
+ */
+ public java.lang.CharSequence getUserAgent() {
+ throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'userAgent' field.
+ * @param value the value to set.
+ */
+ public void setUserAgent(java.lang.CharSequence value) {
+ throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'userAgent' field. A field is dirty if it represents a change that has not yet been written to the database.
+ * @param value the value to set.
+ */
+ public boolean isUserAgentDirty(java.lang.CharSequence value) {
+ throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
+ }
+
+
}
-}
+
+}
\ No newline at end of file
Modified: gora/trunk/pom.xml
URL: http://svn.apache.org/viewvc/gora/trunk/pom.xml?rev=1586888&r1=1586887&r2=1586888&view=diff
==============================================================================
--- gora/trunk/pom.xml (original)
+++ gora/trunk/pom.xml Sat Apr 12 19:21:53 2014
@@ -410,6 +410,7 @@
<inherited>true</inherited>
<executions>
<execution>
+ <id>copy</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
@@ -571,12 +572,14 @@
</profiles>
<modules>
+ <module>gora-compiler</module>
+ <module>gora-compiler-cli</module>
<module>gora-core</module>
<module>gora-hbase</module>
<module>gora-accumulo</module>
<module>gora-cassandra</module>
- <!-- module>gora-solr</module-->
- <module>gora-dynamodb</module>
+ <module>gora-solr</module>
+ <!--module>gora-dynamodb</module-->
<!--module>gora-sql</module-->
<module>gora-tutorial</module>
<module>sources-dist</module>
@@ -590,19 +593,18 @@
<!-- Hadoop Dependencies -->
<hadoop.version>1.0.1</hadoop.version>
<hadoop.test.version>1.0.1</hadoop.test.version>
- <hbase.version>0.90.4</hbase.version>
- <avro.version>1.3.3</avro.version>
+ <hbase.version>0.94.14</hbase.version>
+ <avro.version>1.7.4</avro.version>
<cxf-rt-frontend-jaxrs.version>2.5.2</cxf-rt-frontend-jaxrs.version>
<!-- Amazon Dependencies -->
<amazon.version>1.3.12</amazon.version>
<!-- Cassandra Dependencies -->
- <cassandra.version>1.1.2</cassandra.version>
- <libthrift.version>0.7.0</libthrift.version>
- <hector.version>1.1-0</hector.version>
+ <cassandra.version>2.0.2</cassandra.version>
+ <hector.version>1.1-4</hector.version>
<!-- Solr Dependencies -->
<lucene-solr.version>4.3.0</lucene-solr.version>
<solr-solrj.version>4.3.0</solr-solrj.version>
- <jetty.version>8.1.10.v20130312</jetty.version>
+ <jetty.version>8.1.8.v20121106</jetty.version>
<slf4j.version>1.6.6</slf4j.version>
<log4j.version>1.2.16</log4j.version>
<tika.version>1.3</tika.version>
@@ -611,14 +613,14 @@
<restlet.version>2.1.1</restlet.version>
<!-- Misc Dependencies -->
- <guava.version>10.0.1</guava.version>
+ <guava.version>13.0</guava.version>
<commons-lang.version>2.6</commons-lang.version>
<jdom.version>1.1.2</jdom.version>
<hsqldb.version>2.2.8</hsqldb.version>
<mysql.version>5.1.18</mysql.version>
<xerces.version>2.9.1</xerces.version>
<!-- Logging Dependencies -->
- <slf4j.version>1.6.1</slf4j.version>
+ <slf4j.version>1.5.8</slf4j.version>
<log4j.version>1.2.16</log4j.version>
<!-- Testing Dependencies -->
@@ -627,7 +629,8 @@
<!-- Maven Plugin Dependencies -->
<maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
<maven-resources-plugin.version>2.5</maven-resources-plugin.version>
- <maven-jar-plugin.version>2.4</maven-jar-plugin.version>
+ <!-- pegged at 2.3.2 for eclipse users, see https://github.com/sonatype/m2eclipse-extras/issues/10 -->
+ <maven-jar-plugin.version>2.3.2</maven-jar-plugin.version>
<maven-dependency-plugin.version>2.4</maven-dependency-plugin.version>
<build-helper-maven-plugin.version>1.7</build-helper-maven-plugin.version>
<maven-surfire-plugin.version>2.12</maven-surfire-plugin.version>
@@ -667,7 +670,7 @@
<type>test-jar</type>
</dependency>
- <!--dependency>
+ <dependency>
<groupId>org.apache.gora</groupId>
<artifactId>gora-solr</artifactId>
<version>${project.version}</version>
@@ -677,7 +680,7 @@
<artifactId>gora-solr</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
- </dependency-->
+ </dependency>
<dependency>
<groupId>org.apache.gora</groupId>
@@ -702,6 +705,30 @@
<version>${project.version}</version>
<type>test-jar</type>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.gora</groupId>
+ <artifactId>gora-compiler</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!--dependency>
+ <groupId>org.apache.gora</groupId>
+ <artifactId>gora-core</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ </dependency-->
+
+ <dependency>
+ <groupId>org.apache.gora</groupId>
+ <artifactId>gora-compiler-cli</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!--dependency>
+ <groupId>org.apache.gora</groupId>
+ <artifactId>gora-core</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ </dependency-->
<dependency>
<groupId>org.apache.gora</groupId>
@@ -786,7 +813,7 @@
</dependency>
<dependency>
- <groupId>org.apache.hadoop</groupId>
+ <groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>${avro.version}</version>
<exclusions>
@@ -796,17 +823,53 @@
</exclusion>
</exclusions>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.avro</groupId>
+ <artifactId>avro-compiler</artifactId>
+ <version>${avro.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.avro</groupId>
+ <artifactId>avro-mapred</artifactId>
+ <version>${avro.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase</artifactId>
<version>${hbase.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>avro</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase</artifactId>
<version>${hbase.version}</version>
<type>test-jar</type>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>avro</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<!-- Cassandra Dependencies -->
@@ -817,8 +880,8 @@
<scope>test</scope>
<exclusions>
<exclusion>
- <groupId>org.apache.cassandra.deps</groupId>
- <artifactId>avro</artifactId>
+ <groupId>org.apache.cassandra.deps</groupId>
+ <artifactId>avro</artifactId>
</exclusion>
</exclusions>
</dependency>
@@ -834,15 +897,15 @@
<artifactId>hector-core</artifactId>
<version>${hector.version}</version>
<exclusions>
- <exclusion>
- <groupId>org.apache.cassandra</groupId>
- <artifactId>cassandra-all</artifactId>
- </exclusion>
- </exclusions>
+ <exclusion>
+ <groupId>org.apache.cassandra</groupId>
+ <artifactId>cassandra-all</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<!-- Solr Dependencies -->
- <!--dependency>
+ <dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-core</artifactId>
<version>${lucene-solr.version}</version>
@@ -1131,7 +1194,7 @@
<groupId>com.carrotsearch.randomizedtesting</groupId>
<artifactId>randomizedtesting-runner</artifactId>
<version>2.0.10</version>
- </dependency-->
+ </dependency>
<!-- Amazon Dependencies -->
<dependency>
@@ -1252,7 +1315,7 @@
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>
-
+
</dependencies>
</dependencyManagement>