From 0266eaed00e090933f32ccb3c8405ca5af7df5df Mon Sep 17 00:00:00 2001 From: Billie Rinaldi Date: Mon, 5 Mar 2012 22:49:35 +0000 Subject: [PATCH] ACCUMULO-441 ACCUMULO-411 merged javadocs fixes from trunk to 1.4 and added better links git-svn-id: https://svn.apache.org/repos/asf/incubator/accumulo/branches/1.4@1297265 13f79535-47bb-0310-9956-ffa450edef68 --- .../wikisearch/ingest/WikipediaMapper.java | 2 +- .../examples/wikisearch/util/TextUtil.java | 4 +-- .../iterator/AbstractEvaluatingIterator.java | 4 +-- .../wikisearch/iterator/AndIterator.java | 26 +++++++++--------- .../wikisearch/iterator/OrIterator.java | 12 ++++----- .../wikisearch/logic/AbstractQueryLogic.java | 9 ------- .../parser/FieldIndexQueryReWriter.java | 27 +++++++------------ .../wikisearch/parser/QueryEvaluator.java | 1 - .../wikisearch/parser/RangeCalculator.java | 4 --- .../examples/wikisearch/query/Query.java | 2 +- 10 files changed, 34 insertions(+), 57 deletions(-) diff --git a/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/WikipediaMapper.java b/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/WikipediaMapper.java index a06c57f..fc328cc 100644 --- a/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/WikipediaMapper.java +++ b/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/WikipediaMapper.java @@ -112,7 +112,7 @@ public void setup(Context context) { * * @param article * @param numPartitions - * @return + * @return The number of the partition for a given article. * @throws IllegalFormatException */ public static int getPartitionId(Article article, int numPartitions) throws IllegalFormatException { diff --git a/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/util/TextUtil.java b/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/util/TextUtil.java index 34b40d1..1623d55 100644 --- a/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/util/TextUtil.java +++ b/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/util/TextUtil.java @@ -62,9 +62,9 @@ public static void appendNullByte(Text text) { /** * Appends the UTF-8 bytes of the given string to the given {@link Text} * - * @param text + * @param t * the Text to which to append - * @param string + * @param s * the String to append */ public static void textAppendNoNull(Text t, String s) { diff --git a/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/AbstractEvaluatingIterator.java b/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/AbstractEvaluatingIterator.java index b3f7213..87b4da2 100644 --- a/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/AbstractEvaluatingIterator.java +++ b/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/AbstractEvaluatingIterator.java @@ -114,10 +114,10 @@ public AbstractEvaluatingIterator() {} public abstract void fillMap(EventFields event, Key key, Value value) throws Exception; /** - * Check to see if this key should be acted upon. Provides the ability to skip this key and all of the following ones that match using the comparator. + * Provides the ability to skip this key and all of the following ones that match using the comparator. * * @param key - * @return + * @return true if the key should be acted upon, otherwise false. * @throws IOException */ public abstract boolean isKeyAccepted(Key key) throws IOException; diff --git a/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/AndIterator.java b/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/AndIterator.java index b675e9b..74fbc0c 100644 --- a/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/AndIterator.java +++ b/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/AndIterator.java @@ -96,7 +96,7 @@ protected Text getPartition(Key key) { * Returns the given key's dataLocation * * @param key - * @return + * @return The given key's dataLocation */ protected Text getDataLocation(Key key) { return key.getColumnFamily(); @@ -106,7 +106,7 @@ protected Text getDataLocation(Key key) { * Returns the given key's term * * @param key - * @return + * @return The given key's term */ protected Text getTerm(Key key) { int idx = 0; @@ -120,7 +120,7 @@ protected Text getTerm(Key key) { * Returns the given key's DocID * * @param key - * @return + * @return The given key's DocID */ protected Text getDocID(Key key) { int idx = 0; @@ -134,7 +134,7 @@ protected Text getDocID(Key key) { * Returns the given key's UID * * @param key - * @return + * @return The given key's UID */ protected String getUID(Key key) { int idx = 0; @@ -151,7 +151,7 @@ protected String getUID(Key key) { * The desired row * @param dataLocation * The desired dataLocation - * @return + * @return A Key object built from the given row and dataLocation. */ protected Key buildKey(Text row, Text dataLocation) { return new Key(row, (dataLocation == null) ? nullText : dataLocation); @@ -166,7 +166,7 @@ protected Key buildKey(Text row, Text dataLocation) { * The desired dataLocation * @param term * The desired term - * @return + * @return A Key object built from the given row, dataLocation, and term. */ protected Key buildKey(Text row, Text dataLocation, Text term) { return new Key(row, (dataLocation == null) ? nullText : dataLocation, (term == null) ? nullText : term); @@ -177,7 +177,7 @@ protected Key buildKey(Text row, Text dataLocation, Text term) { * * @param key * The key who will be directly before the returned key - * @return + * @return The key directly following the given key. */ protected Key buildFollowingPartitionKey(Key key) { return key.followingKey(PartialKey.ROW); @@ -589,7 +589,7 @@ public static String stringTopKey(SortedKeyValueIterator iter) { * * @param columns * The columns to be encoded - * @return + * @return A Base64 encoded string (using a \n delimiter) of all columns to intersect on. */ public static String encodeColumns(Text[] columns) { StringBuilder sb = new StringBuilder(); @@ -605,7 +605,7 @@ public static String encodeColumns(Text[] columns) { * * @param terms * The terms to be encoded - * @return + * @return A Base64 encoded string (using a \n delimiter) of all terms to intersect on. */ public static String encodeTermValues(Text[] terms) { StringBuilder sb = new StringBuilder(); @@ -622,7 +622,7 @@ public static String encodeTermValues(Text[] terms) { * * @param flags * The array of NOTs - * @return + * @return A base64 encoded string of which columns are NOT'ed */ public static String encodeBooleans(boolean[] flags) { byte[] bytes = new byte[flags.length]; @@ -641,7 +641,7 @@ public static String encodeBooleans(boolean[] flags) { * * @param columns * The Base64 encoded String of the columns - * @return + * @return A Text array of the decoded columns */ public static Text[] decodeColumns(String columns) { String[] columnStrings = columns.split("\n"); @@ -658,7 +658,7 @@ public static Text[] decodeColumns(String columns) { * * @param terms * The Base64 encoded String of the terms - * @return + * @return A Text array of decoded terms. */ public static Text[] decodeTermValues(String terms) { String[] termStrings = terms.split("\n"); @@ -674,7 +674,7 @@ public static Text[] decodeTermValues(String terms) { * Decode the encoded NOT flags into a boolean array * * @param flags - * @return + * @return A boolean array of decoded NOT flags */ public static boolean[] decodeBooleans(String flags) { // return null of there were no flags diff --git a/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/OrIterator.java b/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/OrIterator.java index d632c82..a217701 100644 --- a/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/OrIterator.java +++ b/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/OrIterator.java @@ -150,7 +150,7 @@ public boolean hasTop() { * Returns the given key's row * * @param key - * @return + * @return The given key's row */ protected Text getPartition(Key key) { return key.getRow(); @@ -160,7 +160,7 @@ protected Text getPartition(Key key) { * Returns the given key's dataLocation * * @param key - * @return + * @return The given key's dataLocation */ protected Text getDataLocation(Key key) { return key.getColumnFamily(); @@ -170,7 +170,7 @@ protected Text getDataLocation(Key key) { * Returns the given key's term * * @param key - * @return + * @return The given key's term */ protected Text getTerm(Key key) { int idx = 0; @@ -184,7 +184,7 @@ protected Text getTerm(Key key) { * Returns the given key's DocID * * @param key - * @return + * @return The given key's DocID */ protected Text getDocID(Key key) { int idx = 0; @@ -198,7 +198,7 @@ protected Text getDocID(Key key) { * Returns the given key's UID * * @param key - * @return + * @return The given key's UID */ static protected String getUID(Key key) { try { @@ -260,7 +260,7 @@ public void addTerm(SortedKeyValueIterator source, Text dataLocation, * Construct the topKey given the current TermSource * * @param TS - * @return + * @return The top Key for a given TermSource */ protected Key buildTopKey(TermSource TS) { if ((TS == null) || (TS.topKey == null)) { diff --git a/query/src/main/java/org/apache/accumulo/examples/wikisearch/logic/AbstractQueryLogic.java b/query/src/main/java/org/apache/accumulo/examples/wikisearch/logic/AbstractQueryLogic.java index 0f2d472..cb90e92 100644 --- a/query/src/main/java/org/apache/accumulo/examples/wikisearch/logic/AbstractQueryLogic.java +++ b/query/src/main/java/org/apache/accumulo/examples/wikisearch/logic/AbstractQueryLogic.java @@ -222,8 +222,6 @@ public AbstractQueryLogic() { * @param c * @param auths * @param queryLiterals - * @param begin - * @param end * @param datatypes * - optional list of types * @return map of indexed field names to types to normalizers used in this date range @@ -286,8 +284,6 @@ protected Map>> findIndexedTe * @param c * @param auths * @param value - * @param begin - * @param end * @param datatypes * - optional list of types * @return ranges that fit into the date range. @@ -305,11 +301,6 @@ protected Map>> findIndexedTe * multimap of indexed field name and Normalizers used * @param terms * multimap of field name and QueryTerm object - * @param begin - * query begin date - * @param end - * query end date - * @param dateFormatter * @param indexTableName * @param reverseIndexTableName * @param queryString diff --git a/query/src/main/java/org/apache/accumulo/examples/wikisearch/parser/FieldIndexQueryReWriter.java b/query/src/main/java/org/apache/accumulo/examples/wikisearch/parser/FieldIndexQueryReWriter.java index fc81df2..acfb4f4 100644 --- a/query/src/main/java/org/apache/accumulo/examples/wikisearch/parser/FieldIndexQueryReWriter.java +++ b/query/src/main/java/org/apache/accumulo/examples/wikisearch/parser/FieldIndexQueryReWriter.java @@ -90,7 +90,7 @@ public static void setLogLevel(Level lev) { * * @param query * @param options - * @return + * @return String representation of a given query. * @throws ParseException * @throws Exception */ @@ -115,7 +115,7 @@ public String removeNonIndexedTermsAndInvalidRanges(String query, Map options) thr * @param query * @param fNameUpper * @param fValueUpper - * @return + * @return String representation of a given query. * @throws ParseException */ public String applyCaseSensitivity(String query, boolean fNameUpper, boolean fValueUpper) throws ParseException { @@ -748,9 +748,7 @@ private RewriterTreeNode collapseBranches(RewriterTreeNode myroot) throws Except } /** - * * @param options - * @return */ public Multimap parseIndexedTerms(Map options) { if (options.get(INDEXED_TERMS_LIST) != null) { @@ -782,9 +780,7 @@ public Multimap parseIndexedTerms(Map options) { } /** - * * @param root - * @return */ public RewriterTreeNode refactorTree(RewriterTreeNode root) { Enumeration dfe = root.breadthFirstEnumeration(); @@ -983,8 +979,7 @@ private void init(int type, String fName, String fValue, boolean negate) { } /** - * - * @return + * @return The field name. */ public String getFieldName() { return fieldName; @@ -1000,7 +995,7 @@ public void setFieldName(String fieldName) { /** * - * @return + * @return The field value. */ public String getFieldValue() { return fieldValue; @@ -1016,7 +1011,7 @@ public void setFieldValue(String fieldValue) { /** * - * @return + * @return true if negated, otherwise false. */ public boolean isNegated() { return negated; @@ -1032,7 +1027,7 @@ public void setNegated(boolean negated) { /** * - * @return + * @return The operator. */ public String getOperator() { return operator; @@ -1048,7 +1043,7 @@ public void setOperator(String operator) { /** * - * @return + * @return The type. */ public int getType() { return type; @@ -1070,10 +1065,6 @@ public void setRemoval(boolean removal) { this.removal = removal; } - /** - * - * @return - */ public String getContents() { StringBuilder s = new StringBuilder("["); s.append(toString()); @@ -1092,7 +1083,7 @@ public String getContents() { /** * - * @return + * @return A string represenation of the field name and value. */ public String printNode() { StringBuilder s = new StringBuilder("["); diff --git a/query/src/main/java/org/apache/accumulo/examples/wikisearch/parser/QueryEvaluator.java b/query/src/main/java/org/apache/accumulo/examples/wikisearch/parser/QueryEvaluator.java index feac1d3..aaac3d8 100644 --- a/query/src/main/java/org/apache/accumulo/examples/wikisearch/parser/QueryEvaluator.java +++ b/query/src/main/java/org/apache/accumulo/examples/wikisearch/parser/QueryEvaluator.java @@ -201,7 +201,6 @@ public StringBuilder rewriteQuery(StringBuilder query, String fieldName, Collect * Evaluates the query against an event. * * @param eventFields - * @return */ public boolean evaluate(EventFields eventFields) { diff --git a/query/src/main/java/org/apache/accumulo/examples/wikisearch/parser/RangeCalculator.java b/query/src/main/java/org/apache/accumulo/examples/wikisearch/parser/RangeCalculator.java index ca3f9bb..d416f60 100644 --- a/query/src/main/java/org/apache/accumulo/examples/wikisearch/parser/RangeCalculator.java +++ b/query/src/main/java/org/apache/accumulo/examples/wikisearch/parser/RangeCalculator.java @@ -279,9 +279,6 @@ static class EvaluationContext { * @param auths * @param indexedTerms * @param terms - * @param begin - * @param end - * @param dateFormatter * @param query * @param logic * @param typeFilter @@ -564,7 +561,6 @@ public Map getTermCardinalities() { * mapKey for wildcard and range queries that specify which mapkey to use in the results * @param typeFilter * - optional list of datatypes - * @return * @throws TableNotFoundException */ protected Map queryGlobalIndex(Map> indexRanges, String specificFieldName, String tableName, boolean isReverse, 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 82ac8e5..bffe8ad 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 @@ -204,7 +204,7 @@ public Results content(String query, String auths) { * * @param query * @param auths - * @return + * @return The results of a query * @throws ParseException */ public Results query(String query, String auths) {