Repository: accumulo-wikisearch Updated Branches: refs/heads/master 7fdf1bebb -> 5ab605107
http://git-wip-us.apache.org/repos/asf/accumulo-wikisearch/blob/5ab60510/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/protobuf/Uid.java ---------------------------------------------------------------------- diff --git a/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/protobuf/Uid.java b/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/protobuf/Uid.java index c469748..619be73 100644 --- a/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/protobuf/Uid.java +++ b/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/protobuf/Uid.java @@ -1,19 +1,3 @@ -/* - * 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 - * - * 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. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: Uid.proto @@ -21,119 +5,282 @@ package org.apache.accumulo.examples.wikisearch.protobuf; public final class Uid { private Uid() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {} - - public static final class List extends com.google.protobuf.GeneratedMessage { + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + public interface ListOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required bool IGNORE = 1; + /** + * <code>required bool IGNORE = 1;</code> + */ + boolean hasIGNORE(); + /** + * <code>required bool IGNORE = 1;</code> + */ + boolean getIGNORE(); + + // required uint64 COUNT = 2; + /** + * <code>required uint64 COUNT = 2;</code> + */ + boolean hasCOUNT(); + /** + * <code>required uint64 COUNT = 2;</code> + */ + long getCOUNT(); + + // repeated string UID = 3; + /** + * <code>repeated string UID = 3;</code> + */ + java.util.List<java.lang.String> + getUIDList(); + /** + * <code>repeated string UID = 3;</code> + */ + int getUIDCount(); + /** + * <code>repeated string UID = 3;</code> + */ + java.lang.String getUID(int index); + /** + * <code>repeated string UID = 3;</code> + */ + com.google.protobuf.ByteString + getUIDBytes(int index); + } + /** + * Protobuf type {@code org.apache.accumulo.examples.wikisearch.protobuf.List} + */ + public static final class List extends + com.google.protobuf.GeneratedMessage + implements ListOrBuilder { // Use List.newBuilder() to construct. - private List() { - initFields(); + private List(com.google.protobuf.GeneratedMessage.Builder<?> builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); } - - private List(boolean noInit) {} - + private List(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final List defaultInstance; - public static List getDefaultInstance() { return defaultInstance; } - + public List getDefaultInstanceForType() { return defaultInstance; } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.apache.accumulo.examples.wikisearch.protobuf.Uid.internal_static_protobuf_List_descriptor; + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.apache.accumulo.examples.wikisearch.protobuf.Uid.internal_static_protobuf_List_fieldAccessorTable; + private List( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + iGNORE_ = input.readBool(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + cOUNT_ = input.readUInt64(); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + uID_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + uID_.add(input.readBytes()); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + uID_ = new com.google.protobuf.UnmodifiableLazyStringList(uID_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } } - + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.accumulo.examples.wikisearch.protobuf.Uid.internal_static_org_apache_accumulo_examples_wikisearch_protobuf_List_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.accumulo.examples.wikisearch.protobuf.Uid.internal_static_org_apache_accumulo_examples_wikisearch_protobuf_List_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.accumulo.examples.wikisearch.protobuf.Uid.List.class, org.apache.accumulo.examples.wikisearch.protobuf.Uid.List.Builder.class); + } + + public static com.google.protobuf.Parser<List> PARSER = + new com.google.protobuf.AbstractParser<List>() { + public List parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new List(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser<List> getParserForType() { + return PARSER; + } + + private int bitField0_; // required bool IGNORE = 1; public static final int IGNORE_FIELD_NUMBER = 1; - private boolean hasIGNORE; - private boolean iGNORE_ = false; - + private boolean iGNORE_; + /** + * <code>required bool IGNORE = 1;</code> + */ public boolean hasIGNORE() { - return hasIGNORE; + return ((bitField0_ & 0x00000001) == 0x00000001); } - + /** + * <code>required bool IGNORE = 1;</code> + */ public boolean getIGNORE() { return iGNORE_; } - + // required uint64 COUNT = 2; public static final int COUNT_FIELD_NUMBER = 2; - private boolean hasCOUNT; - private long cOUNT_ = 0L; - + private long cOUNT_; + /** + * <code>required uint64 COUNT = 2;</code> + */ public boolean hasCOUNT() { - return hasCOUNT; + return ((bitField0_ & 0x00000002) == 0x00000002); } - + /** + * <code>required uint64 COUNT = 2;</code> + */ public long getCOUNT() { return cOUNT_; } - + // repeated string UID = 3; public static final int UID_FIELD_NUMBER = 3; - private java.util.List<java.lang.String> uID_ = java.util.Collections.emptyList(); - - public java.util.List<java.lang.String> getUIDList() { + private com.google.protobuf.LazyStringList uID_; + /** + * <code>repeated string UID = 3;</code> + */ + public java.util.List<java.lang.String> + getUIDList() { return uID_; } - + /** + * <code>repeated string UID = 3;</code> + */ public int getUIDCount() { return uID_.size(); } - + /** + * <code>repeated string UID = 3;</code> + */ public java.lang.String getUID(int index) { return uID_.get(index); } - - private void initFields() {} - + /** + * <code>repeated string UID = 3;</code> + */ + public com.google.protobuf.ByteString + getUIDBytes(int index) { + return uID_.getByteString(index); + } + + private void initFields() { + iGNORE_ = false; + cOUNT_ = 0L; + uID_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + private byte memoizedIsInitialized = -1; public final boolean isInitialized() { - if (!hasIGNORE) + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasIGNORE()) { + memoizedIsInitialized = 0; return false; - if (!hasCOUNT) + } + if (!hasCOUNT()) { + memoizedIsInitialized = 0; return false; + } + memoizedIsInitialized = 1; return true; } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { getSerializedSize(); - if (hasIGNORE()) { - output.writeBool(1, getIGNORE()); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBool(1, iGNORE_); } - if (hasCOUNT()) { - output.writeUInt64(2, getCOUNT()); + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeUInt64(2, cOUNT_); } - for (java.lang.String element : getUIDList()) { - output.writeString(3, element); + for (int i = 0; i < uID_.size(); i++) { + output.writeBytes(3, uID_.getByteString(i)); } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; - public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) - return size; - + if (size != -1) return size; + size = 0; - if (hasIGNORE()) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, getIGNORE()); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, iGNORE_); } - if (hasCOUNT()) { - size += com.google.protobuf.CodedOutputStream.computeUInt64Size(2, getCOUNT()); + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, cOUNT_); } { int dataSize = 0; - for (java.lang.String element : getUIDList()) { - dataSize += com.google.protobuf.CodedOutputStream.computeStringSizeNoTag(element); + for (int i = 0; i < uID_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(uID_.getByteString(i)); } size += dataSize; size += 1 * getUIDList().size(); @@ -142,156 +289,182 @@ public final class Uid { memoizedSerializedSize = size; return size; } - - public static org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); } - - public static org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + + public static org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parseFrom( + com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry).buildParsed(); + return PARSER.parseFrom(data); } - - public static org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + public static org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - - public static org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + public static org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry).buildParsed(); + return PARSER.parseFrom(data); } - - public static org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + public static org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - - public static org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + public static org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry).buildParsed(); - } - - public static org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseFrom(input); } - - public static org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + public static org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseFrom(input, extensionRegistry); } - - public static org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + public static org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); } - - public static org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + public static org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry).buildParsed(); + return PARSER.parseDelimitedFrom(input, extensionRegistry); } - - public static Builder newBuilder() { - return Builder.create(); + public static org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); } - - public Builder newBuilderForType() { - return newBuilder(); + public static org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); } - + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.apache.accumulo.examples.wikisearch.protobuf.Uid.List prototype) { return newBuilder().mergeFrom(prototype); } - - public Builder toBuilder() { - return newBuilder(this); - } - - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> { - private org.apache.accumulo.examples.wikisearch.protobuf.Uid.List result; - - // Construct using protobuf.Uid.List.newBuilder() - private Builder() {} - - private static Builder create() { - Builder builder = new Builder(); - builder.result = new org.apache.accumulo.examples.wikisearch.protobuf.Uid.List(); - return builder; + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code org.apache.accumulo.examples.wikisearch.protobuf.List} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder<Builder> + implements org.apache.accumulo.examples.wikisearch.protobuf.Uid.ListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.accumulo.examples.wikisearch.protobuf.Uid.internal_static_org_apache_accumulo_examples_wikisearch_protobuf_List_descriptor; } - - protected org.apache.accumulo.examples.wikisearch.protobuf.Uid.List internalGetResult() { - return result; + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.accumulo.examples.wikisearch.protobuf.Uid.internal_static_org_apache_accumulo_examples_wikisearch_protobuf_List_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.accumulo.examples.wikisearch.protobuf.Uid.List.class, org.apache.accumulo.examples.wikisearch.protobuf.Uid.List.Builder.class); } - - public Builder clear() { - if (result == null) { - throw new IllegalStateException("Cannot call clear() after build()."); + + // Construct using org.apache.accumulo.examples.wikisearch.protobuf.Uid.List.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } - result = new org.apache.accumulo.examples.wikisearch.protobuf.Uid.List(); + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + iGNORE_ = false; + bitField0_ = (bitField0_ & ~0x00000001); + cOUNT_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + uID_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); return this; } - + public Builder clone() { - return create().mergeFrom(result); + return create().mergeFrom(buildPartial()); } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return org.apache.accumulo.examples.wikisearch.protobuf.Uid.List.getDescriptor(); + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.accumulo.examples.wikisearch.protobuf.Uid.internal_static_org_apache_accumulo_examples_wikisearch_protobuf_List_descriptor; } - + public org.apache.accumulo.examples.wikisearch.protobuf.Uid.List getDefaultInstanceForType() { return org.apache.accumulo.examples.wikisearch.protobuf.Uid.List.getDefaultInstance(); } - - public boolean isInitialized() { - return result.isInitialized(); - } - + public org.apache.accumulo.examples.wikisearch.protobuf.Uid.List build() { - if (result != null && !isInitialized()) { + org.apache.accumulo.examples.wikisearch.protobuf.Uid.List result = buildPartial(); + if (!result.isInitialized()) { throw newUninitializedMessageException(result); } - return buildPartial(); - } - - private org.apache.accumulo.examples.wikisearch.protobuf.Uid.List buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - if (!isInitialized()) { - throw newUninitializedMessageException(result).asInvalidProtocolBufferException(); - } - return buildPartial(); + return result; } - + public org.apache.accumulo.examples.wikisearch.protobuf.Uid.List buildPartial() { - if (result == null) { - throw new IllegalStateException("build() has already been called on this Builder."); + org.apache.accumulo.examples.wikisearch.protobuf.Uid.List result = new org.apache.accumulo.examples.wikisearch.protobuf.Uid.List(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.iGNORE_ = iGNORE_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; } - if (result.uID_ != java.util.Collections.EMPTY_LIST) { - result.uID_ = java.util.Collections.unmodifiableList(result.uID_); + result.cOUNT_ = cOUNT_; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + uID_ = new com.google.protobuf.UnmodifiableLazyStringList( + uID_); + bitField0_ = (bitField0_ & ~0x00000004); } - org.apache.accumulo.examples.wikisearch.protobuf.Uid.List returnMe = result; - result = null; - return returnMe; + result.uID_ = uID_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.apache.accumulo.examples.wikisearch.protobuf.Uid.List) { - return mergeFrom((org.apache.accumulo.examples.wikisearch.protobuf.Uid.List) other); + return mergeFrom((org.apache.accumulo.examples.wikisearch.protobuf.Uid.List)other); } else { super.mergeFrom(other); return this; } } - + public Builder mergeFrom(org.apache.accumulo.examples.wikisearch.protobuf.Uid.List other) { - if (other == org.apache.accumulo.examples.wikisearch.protobuf.Uid.List.getDefaultInstance()) - return this; + if (other == org.apache.accumulo.examples.wikisearch.protobuf.Uid.List.getDefaultInstance()) return this; if (other.hasIGNORE()) { setIGNORE(other.getIGNORE()); } @@ -299,172 +472,259 @@ public final class Uid { setCOUNT(other.getCOUNT()); } if (!other.uID_.isEmpty()) { - if (result.uID_.isEmpty()) { - result.uID_ = new java.util.ArrayList<java.lang.String>(); + if (uID_.isEmpty()) { + uID_ = other.uID_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureUIDIsMutable(); + uID_.addAll(other.uID_); } - result.uID_.addAll(other.uID_); + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - - public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + + public final boolean isInitialized() { + if (!hasIGNORE()) { + + return false; + } + if (!hasCOUNT()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - return this; - default: { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - return this; - } - break; - } - case 8: { - setIGNORE(input.readBool()); - break; - } - case 16: { - setCOUNT(input.readUInt64()); - break; - } - case 26: { - addUID(input.readString()); - break; - } + org.apache.accumulo.examples.wikisearch.protobuf.Uid.List parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.accumulo.examples.wikisearch.protobuf.Uid.List) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - + private int bitField0_; + // required bool IGNORE = 1; + private boolean iGNORE_ ; + /** + * <code>required bool IGNORE = 1;</code> + */ public boolean hasIGNORE() { - return result.hasIGNORE(); + return ((bitField0_ & 0x00000001) == 0x00000001); } - + /** + * <code>required bool IGNORE = 1;</code> + */ public boolean getIGNORE() { - return result.getIGNORE(); + return iGNORE_; } - + /** + * <code>required bool IGNORE = 1;</code> + */ public Builder setIGNORE(boolean value) { - result.hasIGNORE = true; - result.iGNORE_ = value; + bitField0_ |= 0x00000001; + iGNORE_ = value; + onChanged(); return this; } - + /** + * <code>required bool IGNORE = 1;</code> + */ public Builder clearIGNORE() { - result.hasIGNORE = false; - result.iGNORE_ = false; + bitField0_ = (bitField0_ & ~0x00000001); + iGNORE_ = false; + onChanged(); return this; } - + // required uint64 COUNT = 2; + private long cOUNT_ ; + /** + * <code>required uint64 COUNT = 2;</code> + */ public boolean hasCOUNT() { - return result.hasCOUNT(); + return ((bitField0_ & 0x00000002) == 0x00000002); } - + /** + * <code>required uint64 COUNT = 2;</code> + */ public long getCOUNT() { - return result.getCOUNT(); + return cOUNT_; } - + /** + * <code>required uint64 COUNT = 2;</code> + */ public Builder setCOUNT(long value) { - result.hasCOUNT = true; - result.cOUNT_ = value; + bitField0_ |= 0x00000002; + cOUNT_ = value; + onChanged(); return this; } - + /** + * <code>required uint64 COUNT = 2;</code> + */ public Builder clearCOUNT() { - result.hasCOUNT = false; - result.cOUNT_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + cOUNT_ = 0L; + onChanged(); return this; } - + // repeated string UID = 3; - public java.util.List<java.lang.String> getUIDList() { - return java.util.Collections.unmodifiableList(result.uID_); - } - + private com.google.protobuf.LazyStringList uID_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUIDIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + uID_ = new com.google.protobuf.LazyStringArrayList(uID_); + bitField0_ |= 0x00000004; + } + } + /** + * <code>repeated string UID = 3;</code> + */ + public java.util.List<java.lang.String> + getUIDList() { + return java.util.Collections.unmodifiableList(uID_); + } + /** + * <code>repeated string UID = 3;</code> + */ public int getUIDCount() { - return result.getUIDCount(); + return uID_.size(); } - + /** + * <code>repeated string UID = 3;</code> + */ public java.lang.String getUID(int index) { - return result.getUID(index); - } - - public Builder setUID(int index, java.lang.String value) { + return uID_.get(index); + } + /** + * <code>repeated string UID = 3;</code> + */ + public com.google.protobuf.ByteString + getUIDBytes(int index) { + return uID_.getByteString(index); + } + /** + * <code>repeated string UID = 3;</code> + */ + public Builder setUID( + int index, java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - result.uID_.set(index, value); + throw new NullPointerException(); + } + ensureUIDIsMutable(); + uID_.set(index, value); + onChanged(); return this; } - - public Builder addUID(java.lang.String value) { + /** + * <code>repeated string UID = 3;</code> + */ + public Builder addUID( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - if (result.uID_.isEmpty()) { - result.uID_ = new java.util.ArrayList<java.lang.String>(); - } - result.uID_.add(value); + throw new NullPointerException(); + } + ensureUIDIsMutable(); + uID_.add(value); + onChanged(); return this; } - - public Builder addAllUID(java.lang.Iterable<? extends java.lang.String> values) { - if (result.uID_.isEmpty()) { - result.uID_ = new java.util.ArrayList<java.lang.String>(); - } - super.addAll(values, result.uID_); + /** + * <code>repeated string UID = 3;</code> + */ + public Builder addAllUID( + java.lang.Iterable<java.lang.String> values) { + ensureUIDIsMutable(); + super.addAll(values, uID_); + onChanged(); return this; } - + /** + * <code>repeated string UID = 3;</code> + */ public Builder clearUID() { - result.uID_ = java.util.Collections.emptyList(); + uID_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * <code>repeated string UID = 3;</code> + */ + public Builder addUIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUIDIsMutable(); + uID_.add(value); + onChanged(); return this; } - - // @@protoc_insertion_point(builder_scope:protobuf.List) + + // @@protoc_insertion_point(builder_scope:org.apache.accumulo.examples.wikisearch.protobuf.List) } - + static { defaultInstance = new List(true); - org.apache.accumulo.examples.wikisearch.protobuf.Uid.internalForceInit(); defaultInstance.initFields(); } - - // @@protoc_insertion_point(class_scope:protobuf.List) + + // @@protoc_insertion_point(class_scope:org.apache.accumulo.examples.wikisearch.protobuf.List) } - - private static com.google.protobuf.Descriptors.Descriptor internal_static_protobuf_List_descriptor; - private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_protobuf_List_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_apache_accumulo_examples_wikisearch_protobuf_List_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_apache_accumulo_examples_wikisearch_protobuf_List_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { return descriptor; } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; static { - java.lang.String[] descriptorData = {"\n\tUid.proto\022\010protobuf\"2\n\004List\022\016\n\006IGNORE\030" - + "\001 \002(\010\022\r\n\005COUNT\030\002 \002(\004\022\013\n\003UID\030\003 \003(\tB\014\n\010pro" + "tobufH\001"}; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors(com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - internal_static_protobuf_List_descriptor = getDescriptor().getMessageTypes().get(0); - internal_static_protobuf_List_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_protobuf_List_descriptor, new java.lang.String[] {"IGNORE", "COUNT", "UID",}, org.apache.accumulo.examples.wikisearch.protobuf.Uid.List.class, - org.apache.accumulo.examples.wikisearch.protobuf.Uid.List.Builder.class); - return null; - } + java.lang.String[] descriptorData = { + "\n\tUid.proto\0220org.apache.accumulo.example" + + "s.wikisearch.protobuf\"2\n\004List\022\016\n\006IGNORE\030" + + "\001 \002(\010\022\r\n\005COUNT\030\002 \002(\004\022\013\n\003UID\030\003 \003(\tB4\n0org" + + ".apache.accumulo.examples.wikisearch.pro" + + "tobufH\001" }; - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}, - assigner); + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + internal_static_org_apache_accumulo_examples_wikisearch_protobuf_List_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_apache_accumulo_examples_wikisearch_protobuf_List_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_apache_accumulo_examples_wikisearch_protobuf_List_descriptor, + new java.lang.String[] { "IGNORE", "COUNT", "UID", }); + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); } - - public static void internalForceInit() {} - + // @@protoc_insertion_point(outer_class_scope) } http://git-wip-us.apache.org/repos/asf/accumulo-wikisearch/blob/5ab60510/ingest/src/main/protobuf/TermWeight.proto ---------------------------------------------------------------------- diff --git a/ingest/src/main/protobuf/TermWeight.proto b/ingest/src/main/protobuf/TermWeight.proto index 41ae188..3d67c31 100644 --- a/ingest/src/main/protobuf/TermWeight.proto +++ b/ingest/src/main/protobuf/TermWeight.proto @@ -17,9 +17,9 @@ // compile extra builder util with java accumulo.data.protobuf.builder.ProtoBufBuilder -d ../java accumulo.data.protobuf.UidList // classpath for compile command should include ../../../target/classes and protobuf-java-2.2.0.jar -package protobuf; +package org.apache.accumulo.examples.wikisearch.protobuf; -option java_package = "protobuf"; +option java_package = "org.apache.accumulo.examples.wikisearch.protobuf"; option optimize_for = SPEED; message Info { http://git-wip-us.apache.org/repos/asf/accumulo-wikisearch/blob/5ab60510/ingest/src/main/protobuf/Uid.proto ---------------------------------------------------------------------- diff --git a/ingest/src/main/protobuf/Uid.proto b/ingest/src/main/protobuf/Uid.proto index 30aa446..db78b5d 100644 --- a/ingest/src/main/protobuf/Uid.proto +++ b/ingest/src/main/protobuf/Uid.proto @@ -17,9 +17,9 @@ // compile extra builder util with java accumulo.data.protobuf.builder.ProtoBufBuilder -d ../java accumulo.data.protobuf.UidList // classpath for compile command should include ../../../target/classes and protobuf-java-2.2.0.jar -package protobuf; +package org.apache.accumulo.examples.wikisearch.protobuf; -option java_package = "protobuf"; +option java_package = "org.apache.accumulo.examples.wikisearch.protobuf"; option optimize_for = SPEED; message List { http://git-wip-us.apache.org/repos/asf/accumulo-wikisearch/blob/5ab60510/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 2e3cb3f..bebc1cf 100644 --- a/pom.xml +++ b/pom.xml @@ -21,12 +21,12 @@ <parent> <groupId>org.apache</groupId> <artifactId>apache</artifactId> - <version>14</version> + <version>18</version> </parent> <groupId>org.apache.accumulo</groupId> <artifactId>accumulo-wikisearch</artifactId> - <version>1.5.0</version> + <version>1.8.0</version> <packaging>pom</packaging> <name>accumulo-wikisearch</name> @@ -44,7 +44,7 @@ <version.commons-lang>2.4</version.commons-lang> <version.ejb-spec-api>1.0.1.Final</version.ejb-spec-api> <version.guava>11.0.2</version.guava> - <version.hadoop>1.0.4</version.hadoop> + <version.hadoop>2.6.4</version.hadoop> <version.jaxrs>2.1.0.GA</version.jaxrs> <version.junit>4.11</version.junit> <version.kryo>1.04</version.kryo> @@ -54,8 +54,8 @@ <version.lucene-analyzers>3.0.2</version.lucene-analyzers> <version.lucene-wikipedia>3.0.2</version.lucene-wikipedia> <version.minlog>1.2</version.minlog> - <version.protobuf>2.3.0</version.protobuf> - <version.thrift>0.9.0</version.thrift> + <version.protobuf>2.5.0</version.protobuf> + <version.thrift>0.9.3</version.thrift> <version.zookeeper>3.3.1</version.zookeeper> </properties> <dependencyManagement> @@ -76,6 +76,16 @@ <version>${version.collections}</version> </dependency> <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.1.1</version> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-math3</artifactId> + <version>3.6.1</version> + </dependency> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${version.junit}</version> @@ -206,6 +216,21 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.7.21</version> + </dependency> + <dependency> + <groupId>org.codehaus.jackson</groupId> + <artifactId>jackson-core-asl</artifactId> + <version>1.9.13</version> + </dependency> + <dependency> + <groupId>org.codehaus.jackson</groupId> + <artifactId>jackson-mapper-asl</artifactId> + <version>1.9.13</version> + </dependency> </dependencies> </dependencyManagement> <repositories> @@ -351,73 +376,4 @@ </plugin> </plugins> </build> - <profiles> - <profile> - <!-- profile for building against Hadoop 1.0.x - Activate by not specifying hadoop.profile --> - <id>hadoop-1.0</id> - <activation> - <property> - <name>!hadoop.profile</name> - </property> - </activation> - <build> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.8</version> - <executions> - <execution> - <id>add-test-source</id> - <goals> - <goal>add-test-source</goal> - </goals> - <phase>generate-test-sources</phase> - <configuration> - <sources> - <source>src/test/hadoop1</source> - </sources> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - <profile> - <!-- profile for building against Hadoop 2.0.x - Activate using: mvn -Dhadoop.profile=2.0 --> - <id>hadoop-2.0</id> - <activation> - <property> - <name>hadoop.profile</name> - <value>2.0</value> - </property> - </activation> - <build> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.8</version> - <executions> - <execution> - <id>add-test-source</id> - <goals> - <goal>add-test-source</goal> - </goals> - <phase>generate-test-sources</phase> - <configuration> - <sources> - <source>src/test/hadoop2</source> - </sources> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> </project> http://git-wip-us.apache.org/repos/asf/accumulo-wikisearch/blob/5ab60510/query-war/pom.xml ---------------------------------------------------------------------- diff --git a/query-war/pom.xml b/query-war/pom.xml index 3ee0bc2..45a1f1b 100644 --- a/query-war/pom.xml +++ b/query-war/pom.xml @@ -20,7 +20,7 @@ <parent> <groupId>org.apache.accumulo</groupId> <artifactId>accumulo-wikisearch</artifactId> - <version>1.5.0</version> + <version>1.8.0</version> </parent> <artifactId>wikisearch-query-war</artifactId> http://git-wip-us.apache.org/repos/asf/accumulo-wikisearch/blob/5ab60510/query/pom.xml ---------------------------------------------------------------------- diff --git a/query/pom.xml b/query/pom.xml index e779945..eeb2337 100644 --- a/query/pom.xml +++ b/query/pom.xml @@ -20,7 +20,7 @@ <parent> <groupId>org.apache.accumulo</groupId> <artifactId>accumulo-wikisearch</artifactId> - <version>1.5.0</version> + <version>1.8.0</version> </parent> <artifactId>wikisearch-query</artifactId> <packaging>ejb</packaging> @@ -51,6 +51,11 @@ <artifactId>commons-collections</artifactId> </dependency> <dependency> + <groupId>commons-configuration</groupId> + <artifactId>commons-configuration</artifactId> + <version>1.6</version> + </dependency> + <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> </dependency> @@ -83,21 +88,9 @@ <scope>runtime</scope> </dependency> <dependency> - <groupId>commons-configuration</groupId> - <artifactId>commons-configuration</artifactId> - <version>1.6</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - <scope>runtime</scope> - </dependency> - <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> - <version>2.1</version> + <version>2.4</version> <scope>runtime</scope> </dependency> <dependency> @@ -142,7 +135,7 @@ <outputDirectory>lib</outputDirectory> <!-- just grab the non-provided runtime dependencies --> <!-- XXX we include guava at the same version as hadoop 2 provides so that we have it on hadoop 1 --> - <includeArtifactIds>commons-io,commons-configuration,commons-lang,commons-codec,protobuf-java,libthrift,zookeeper,hadoop-core,commons-jexl,guava,kryo,asm,minlog,reflectasm,wikisearch-ingest,accumulo-core,accumulo-fate,accumulo-trace</includeArtifactIds> + <includeArtifactIds>commons-io,commons-configuration,commons-lang,commons-codec,protobuf-java,libthrift,zookeeper,hadoop-client,commons-jexl,guava,kryo,asm,minlog,reflectasm,wikisearch-ingest,accumulo-core,accumulo-fate,accumulo-trace</includeArtifactIds> <excludeTransitive>true</excludeTransitive> </configuration> </execution> @@ -178,76 +171,4 @@ </plugin> </plugins> </build> - <profiles> - <!-- profile for building against Hadoop 1.0.x - Activate by not specifying hadoop.profile --> - <profile> - <id>hadoop-1.0</id> - <activation> - <property> - <name>!hadoop.profile</name> - </property> - </activation> - <dependencies> - <dependency> - <groupId>org.apache.hadoop</groupId> - <artifactId>hadoop-core</artifactId> - <version>${version.hadoop}</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> - </profile> - <!-- profile for building against Hadoop 2.0.x - Activate using: mvn -Dhadoop.profile=2.0 --> - <profile> - <id>hadoop-2.0</id> - <activation> - <property> - <name>hadoop.profile</name> - <value>2.0</value> - </property> - </activation> - <dependencies> - <dependency> - <groupId>org.apache.hadoop</groupId> - <artifactId>hadoop-client</artifactId> - <version>${version.hadoop}</version> - <exclusions> - <exclusion> - <groupId>org.codehaus.jackson</groupId> - <artifactId>jackson-mapper-asl</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>copy-dependencies</id> - <goals> - <goal>copy-dependencies</goal> - </goals> - <phase>prepare-package</phase> - <configuration> - <outputDirectory>lib</outputDirectory> - <!-- just grab the non-provided runtime dependencies --> - <includeArtifactIds>commons-io,commons-configuration,commons-lang,commons-codec,protobuf-java,libthrift,zookeeper,hadoop-client,hadoop-common,hadoop-hdfs,commons-jexl,guava,kryo,asm,minlog,reflectasm,wikisearch-ingest,accumulo-core,accumulo-fate,accumulo-trace</includeArtifactIds> - <excludeTransitive>false</excludeTransitive> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> </project> http://git-wip-us.apache.org/repos/asf/accumulo-wikisearch/blob/5ab60510/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/DefaultIteratorEnvironment.java ---------------------------------------------------------------------- diff --git a/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/DefaultIteratorEnvironment.java b/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/DefaultIteratorEnvironment.java index 6b58d08..f05304a 100644 --- a/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/DefaultIteratorEnvironment.java +++ b/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/DefaultIteratorEnvironment.java @@ -18,6 +18,7 @@ package org.apache.accumulo.examples.wikisearch.iterator; import java.io.IOException; +import org.apache.accumulo.core.client.sample.SamplerConfiguration; import org.apache.accumulo.core.conf.AccumuloConfiguration; import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.Value; @@ -25,6 +26,7 @@ import org.apache.accumulo.core.iterators.IteratorEnvironment; import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope; import org.apache.accumulo.core.iterators.SortedKeyValueIterator; import org.apache.accumulo.core.iterators.system.MapFileIterator; +import org.apache.accumulo.core.security.Authorizations; import org.apache.accumulo.core.util.CachedConfiguration; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; @@ -70,5 +72,25 @@ public class DefaultIteratorEnvironment implements IteratorEnvironment { public void registerSideChannel(SortedKeyValueIterator<Key,Value> iter) { throw new UnsupportedOperationException(); } + +@Override +public Authorizations getAuthorizations() { + throw new UnsupportedOperationException(); +} + +@Override +public IteratorEnvironment cloneWithSamplingEnabled() { + throw new UnsupportedOperationException(); +} + +@Override +public boolean isSamplingEnabled() { + throw new UnsupportedOperationException(); +} + +@Override +public SamplerConfiguration getSamplerConfiguration() { + throw new UnsupportedOperationException(); +} } http://git-wip-us.apache.org/repos/asf/accumulo-wikisearch/blob/5ab60510/query/src/main/java/org/apache/accumulo/examples/wikisearch/query/Query.java ---------------------------------------------------------------------- diff --git a/query/src/main/java/org/apache/accumulo/examples/wikisearch/query/Query.java b/query/src/main/java/org/apache/accumulo/examples/wikisearch/query/Query.java index 024a865..62aa4e2 100644 --- a/query/src/main/java/org/apache/accumulo/examples/wikisearch/query/Query.java +++ b/query/src/main/java/org/apache/accumulo/examples/wikisearch/query/Query.java @@ -43,6 +43,7 @@ import javax.xml.transform.stream.StreamSource; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.client.Instance; import org.apache.accumulo.core.client.ZooKeeperInstance; +import org.apache.accumulo.core.client.security.tokens.PasswordToken; import org.apache.accumulo.examples.wikisearch.logic.ContentLogic; import org.apache.accumulo.examples.wikisearch.logic.QueryLogic; import org.apache.accumulo.examples.wikisearch.sample.Results; @@ -179,7 +180,7 @@ public class Query implements IQuery { Instance instance = new ZooKeeperInstance(this.instanceName, this.zooKeepers); try { log.info("Connecting to [instanceName = " + this.instanceName + ", zookeepers = " + this.zooKeepers + ", username = " + this.username + "]."); - connector = instance.getConnector(this.username, this.password.getBytes()); + connector = instance.getConnector(this.username, new PasswordToken(this.password.getBytes())); } catch (Exception e) { throw new EJBException("Error getting connector from instance", e); } @@ -212,7 +213,7 @@ public class Query implements IQuery { Instance instance = new ZooKeeperInstance(this.instanceName, this.zooKeepers); try { log.info("Connecting to [instanceName = " + this.instanceName + ", zookeepers = " + this.zooKeepers + ", username = " + this.username + "]."); - connector = instance.getConnector(this.username, this.password.getBytes()); + connector = instance.getConnector(this.username, new PasswordToken(this.password.getBytes())); } catch (Exception e) { throw new EJBException("Error getting connector from instance", e); }