diff options
author | Jon Bratseth <bratseth@verizonmedia.com> | 2019-06-28 06:13:15 -0500 |
---|---|---|
committer | Jon Bratseth <bratseth@verizonmedia.com> | 2019-06-28 06:13:15 -0500 |
commit | 77fa90c39e927df2e3f18afaf359e3882f1b822b (patch) | |
tree | a097460583e4cf8d285c48c5c8ec2a74d1382592 /docproc | |
parent | 835688ddc6f02b256dfe12a31b57d761ce66c234 (diff) |
Nonfunctional changes only
Diffstat (limited to 'docproc')
13 files changed, 121 insertions, 124 deletions
diff --git a/docproc/src/main/java/com/yahoo/docproc/AbstractConcreteDocumentFactory.java b/docproc/src/main/java/com/yahoo/docproc/AbstractConcreteDocumentFactory.java index 8f771418959..e9a821c66ac 100644 --- a/docproc/src/main/java/com/yahoo/docproc/AbstractConcreteDocumentFactory.java +++ b/docproc/src/main/java/com/yahoo/docproc/AbstractConcreteDocumentFactory.java @@ -1,15 +1,10 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.docproc; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; import java.util.Map; import com.yahoo.document.Document; -import com.yahoo.document.DocumentId; import com.yahoo.document.annotation.Annotation; import com.yahoo.document.datatypes.Struct; -import com.yahoo.document.datatypes.StructuredFieldValue; -import com.yahoo.yolean.Exceptions; /** * Subtyped by factory classes for concrete document types. The factory classes are auto-generated @@ -26,7 +21,10 @@ public abstract class AbstractConcreteDocumentFactory extends com.yahoo.componen /** * Used by the docproc framework to get an instance of a concrete document type without resorting to reflection in a bundle * - * @return A concrete document instance + * @return a concrete document instance */ - public abstract com.yahoo.document.Document getDocumentCopy(java.lang.String type, com.yahoo.document.datatypes.StructuredFieldValue src, com.yahoo.document.DocumentId id); + public abstract com.yahoo.document.Document getDocumentCopy(java.lang.String type, + com.yahoo.document.datatypes.StructuredFieldValue src, + com.yahoo.document.DocumentId id); + } diff --git a/docproc/src/main/java/com/yahoo/docproc/Accesses.java b/docproc/src/main/java/com/yahoo/docproc/Accesses.java index 4c19784ea37..747b129679b 100644 --- a/docproc/src/main/java/com/yahoo/docproc/Accesses.java +++ b/docproc/src/main/java/com/yahoo/docproc/Accesses.java @@ -20,13 +20,14 @@ public @interface Accesses { /** * Describes the annotations produced and consumed on one field in a document - * @author vegardh * + * @author vegardh */ @Documented @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) - public @interface Field { + @interface Field { + /** The name of the document field */ String name(); /** The datatype of the field */ @@ -37,13 +38,13 @@ public @interface Accesses { /** * Describes the annotations produced and consumed in one tree on a field - * @author vegardh * + * @author vegardh */ @Documented @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) - public @interface Tree { + @interface Tree { /** The name of the tree */ String name() default ""; /** The annotation types that this docproc writes in this tree */ diff --git a/docproc/src/main/java/com/yahoo/docproc/Call.java b/docproc/src/main/java/com/yahoo/docproc/Call.java index edde89cd01a..a46e74c0f5f 100644 --- a/docproc/src/main/java/com/yahoo/docproc/Call.java +++ b/docproc/src/main/java/com/yahoo/docproc/Call.java @@ -91,10 +91,10 @@ public class Call implements Cloneable { * if schema mapping or @Accesses is in effect. * * <p> - * public for testing + * Public for testing */ public DocumentPut configDoc(DocumentProcessor docProc, DocumentPut documentPut) { - if (!docProc.getFieldMap().isEmpty() || docProc.hasAnnotations()) { + if ( ! docProc.getFieldMap().isEmpty() || docProc.hasAnnotations()) { Document document = documentPut.getDocument(); document = new ProxyDocument(docProc, document, docProc.getDocMap(document.getDataType().getName())); diff --git a/docproc/src/main/java/com/yahoo/docproc/CallStack.java b/docproc/src/main/java/com/yahoo/docproc/CallStack.java index 1e7bf4fba8e..2a09de1fdd5 100644 --- a/docproc/src/main/java/com/yahoo/docproc/CallStack.java +++ b/docproc/src/main/java/com/yahoo/docproc/CallStack.java @@ -12,18 +12,18 @@ import java.util.List; import java.util.ListIterator; /** - * <p>A stack of the processors to call next in this processing. To push which + * A stack of the processors to call next in this processing. To push which * processor to call next, call addNext, to get and remove the next processor, - * call pop.</p> + * call pop. * - * <p>This is not thread safe.</p> + * This is not thread safe. * * @author bratseth */ public class CallStack { /** The name of this stack, or null if it is not named */ - private String name = null; + private String name; /** The Call objects of this stack */ private final List<Call> elements = new java.util.LinkedList<>(); @@ -51,7 +51,7 @@ public class CallStack { } /** Creates an empty stack with a name */ - public CallStack(final String name, Statistics manager, Metric metric) { + public CallStack(String name, Statistics manager, Metric metric) { this.name = name; this.statistics = manager; this.metric = metric; @@ -61,10 +61,10 @@ public class CallStack { * Creates a stack from another stack (starting at the next of the given * callstack) This does a deep copy of the stack. */ - public CallStack(final CallStack stackToCopy) { + public CallStack(CallStack stackToCopy) { name = stackToCopy.name; - for (final Iterator<Call> i = stackToCopy.iterator(); i.hasNext();) { - final Call callToCopy = i.next(); + for (Iterator<Call> i = stackToCopy.iterator(); i.hasNext();) { + Call callToCopy = i.next(); elements.add((Call) callToCopy.clone()); } this.statistics = stackToCopy.statistics; @@ -78,7 +78,7 @@ public class CallStack { * @param name the name of the stack * @param docprocs the document processors to call */ - public CallStack(final String name, Collection<DocumentProcessor> docprocs, Statistics manager, Metric metric) { + public CallStack(String name, Collection<DocumentProcessor> docprocs, Statistics manager, Metric metric) { this(name, manager, metric); for (DocumentProcessor docproc : docprocs) { addLast(docproc); @@ -91,7 +91,7 @@ public class CallStack { } /** Sets the name of this stack */ - public void setName(final String name) { + public void setName(String name) { this.name = name; } @@ -100,7 +100,7 @@ public class CallStack { * * @return this for convenience */ - public CallStack addNext(final Call call) { + public CallStack addNext(Call call) { elements.add(0, call); return this; } @@ -110,7 +110,7 @@ public class CallStack { * * @return this for convenience */ - public CallStack addNext(final DocumentProcessor processor) { + public CallStack addNext(DocumentProcessor processor) { return addNext(new Call(processor, name, statistics, metric)); } @@ -119,7 +119,7 @@ public class CallStack { * * @return this for convenience */ - public CallStack addNext(final CallStack callStack) { + public CallStack addNext(CallStack callStack) { elements.addAll(0, callStack.elements); return this; } @@ -129,7 +129,7 @@ public class CallStack { * * @return this for convenience */ - public CallStack addLast(final Call call) { + public CallStack addLast(Call call) { elements.add(call); return this; } @@ -139,7 +139,7 @@ public class CallStack { * * @return this for convenience */ - public CallStack addLast(final DocumentProcessor processor) { + public CallStack addLast(DocumentProcessor processor) { return addLast(new Call(processor, name, statistics, metric)); } @@ -148,7 +148,7 @@ public class CallStack { * * @return this for convenience */ - public CallStack addLast(final CallStack callStack) { + public CallStack addLast(CallStack callStack) { elements.addAll(callStack.elements); return this; } @@ -164,8 +164,8 @@ public class CallStack { * @param call the call to add * @return this for convenience */ - public CallStack addBefore(final Call before, final Call call) { - final int insertPosition = elements.indexOf(before); + public CallStack addBefore(Call before, Call call) { + int insertPosition = elements.indexOf(before); if (insertPosition < 0) { addLast(call); } else { @@ -185,7 +185,7 @@ public class CallStack { * @param processor the processor to add * @return this for convenience */ - public CallStack addBefore(final Call before, DocumentProcessor processor) { + public CallStack addBefore(Call before, DocumentProcessor processor) { return addBefore(before, new Call(processor, name, statistics, metric)); } @@ -193,16 +193,13 @@ public class CallStack { * Adds multiple elements just before the first occurence of some element on * the stack. This can not be called during an iteration. * - * @param before - * the call to add this before. If this call is not present (the - * same object instance), the new processor is added as the last - * element - * @param callStack - * the calls to add + * @param before the call to add this before. If this call is not present (the + * same object instance), the new processor is added as the last element + * @param callStack the calls to add * @return this for convenience */ - public CallStack addBefore(final Call before, final CallStack callStack) { - final int insertPosition = elements.indexOf(before); + public CallStack addBefore(Call before, CallStack callStack) { + int insertPosition = elements.indexOf(before); if (insertPosition < 0) { addLast(callStack); } else { @@ -223,8 +220,8 @@ public class CallStack { * the call to add * @return this for convenience */ - public CallStack addAfter(final Call after, final Call call) { - final int insertPosition = elements.indexOf(after); + public CallStack addAfter(Call after, Call call) { + int insertPosition = elements.indexOf(after); if (insertPosition < 0) { addLast(call); } else { @@ -237,15 +234,12 @@ public class CallStack { * Adds an element just after the first occurence of some other element on * the stack. This can not be called during an iteration. * - * @param after - * the call to add this after. If this call is not present, (the - * same object instance), the new processor is added as the last - * element - * @param processor - * the processor to add + * @param after the call to add this after. If this call is not present, (the + * same object instance), the new processor is added as the last element + * @param processor the processor to add * @return this for convenience */ - public CallStack addAfter(final Call after, final DocumentProcessor processor) { + public CallStack addAfter(Call after, DocumentProcessor processor) { return addAfter(after, new Call(processor, name, statistics, metric)); } @@ -253,16 +247,13 @@ public class CallStack { * Adds multiple elements just after another given element on the stack. * This can not be called during an iteration. * - * @param after - * the call to add this before. If this call is not present, (the - * same object instance), the new processor is added as the last - * element - * @param callStack - * the calls to add + * @param after the call to add this before. If this call is not present, (the + * same object instance), the new processor is added as the last element + * @param callStack the calls to add * @return this for convenience */ - public CallStack addAfter(final Call after, final CallStack callStack) { - final int insertPosition = elements.indexOf(after); + public CallStack addAfter(Call after, CallStack callStack) { + int insertPosition = elements.indexOf(after); if (insertPosition < 0) { addLast(callStack); } else { @@ -278,9 +269,9 @@ public class CallStack { * the call to remove * @return this for convenience */ - public CallStack remove(final Call call) { - for (final ListIterator<Call> i = iterator(); i.hasNext();) { - final Call current = i.next(); + public CallStack remove(Call call) { + for (ListIterator<Call> i = iterator(); i.hasNext();) { + Call current = i.next(); if (current == call) { i.remove(); } @@ -295,9 +286,9 @@ public class CallStack { * the call to check * @return true if the call is present, false otherwise */ - public boolean contains(final Call call) { - for (final ListIterator<Call> i = iterator(); i.hasNext();) { - final Call current = i.next(); + public boolean contains(Call call) { + for (ListIterator<Call> i = iterator(); i.hasNext();) { + Call current = i.next(); if (current == call) { return true; } @@ -306,12 +297,11 @@ public class CallStack { } /** - * Returns the next call to this processor id, or null if no such calls are - * left + * Returns the next call to this processor id, or null if no such calls are left */ - public Call findCall(final ComponentId processorId) { - for (final Iterator<Call> i = iterator(); i.hasNext();) { - final Call call = i.next(); + public Call findCall(ComponentId processorId) { + for (Iterator<Call> i = iterator(); i.hasNext();) { + Call call = i.next(); if (call.getDocumentProcessorId().equals(processorId)) { return call; } @@ -323,7 +313,7 @@ public class CallStack { * Returns the next call to this processor, or null if no such calls are * left */ - public Call findCall(final DocumentProcessor processor) { + public Call findCall(DocumentProcessor processor) { return findCall(processor.getId()); } @@ -365,15 +355,14 @@ public class CallStack { return elements.listIterator(); } - /** Returns the number of remainnig elements in this stack */ + /** Returns the number of remaining elements in this stack */ public int size() { return elements.size(); } @Override public String toString() { - StringBuilder b = new StringBuilder(); - b.append("callstack"); + StringBuilder b = new StringBuilder("callstack"); if (name != null) { b.append(" "); b.append(name); diff --git a/docproc/src/main/java/com/yahoo/docproc/SimpleDocumentProcessor.java b/docproc/src/main/java/com/yahoo/docproc/SimpleDocumentProcessor.java index bb9ef8ff636..89985b54fb1 100644 --- a/docproc/src/main/java/com/yahoo/docproc/SimpleDocumentProcessor.java +++ b/docproc/src/main/java/com/yahoo/docproc/SimpleDocumentProcessor.java @@ -19,7 +19,7 @@ import com.yahoo.log.LogLevel; * it is not possible to return a {@link DocumentProcessor.LaterProgress} from any of the process() methods that SimpleDocumentProcessor * provides - since their return type is void.</p> * - * <p>SimpleDocumentProcessor is for the <em>simple</em> cases. For complete control over document processing, + * <p></p>SimpleDocumentProcessor is for the <em>simple</em> cases. For complete control over document processing, * like returning instances of {@link DocumentProcessor.LaterProgress}, subclass {@link DocumentProcessor} instead.</p> * * @author Einar M R Rosenvinge @@ -86,7 +86,7 @@ public class SimpleDocumentProcessor extends DocumentProcessor { */ @Override public final Progress process(Processing processing) { - final int initialSize = processing.getDocumentOperations().size(); + int initialSize = processing.getDocumentOperations().size(); for (DocumentOperation op : processing.getDocumentOperations()) { try { if (op instanceof DocumentPut) { diff --git a/docproc/src/main/java/com/yahoo/docproc/TransientFailureException.java b/docproc/src/main/java/com/yahoo/docproc/TransientFailureException.java index cda196f309c..235e2561066 100644 --- a/docproc/src/main/java/com/yahoo/docproc/TransientFailureException.java +++ b/docproc/src/main/java/com/yahoo/docproc/TransientFailureException.java @@ -2,8 +2,8 @@ package com.yahoo.docproc; /** - * Exception to be thrown by a document processor on transient failures. Caller - * is welcome to try the call again later. + * Exception to be thrown by a document processor on transient failures. + * Caller is welcome to try the call again later. * * @author Einar M R Rosenvinge */ diff --git a/docproc/src/main/java/com/yahoo/docproc/jdisc/RequestContext.java b/docproc/src/main/java/com/yahoo/docproc/jdisc/RequestContext.java index 5d04eb9fe6f..8f021546ac8 100644 --- a/docproc/src/main/java/com/yahoo/docproc/jdisc/RequestContext.java +++ b/docproc/src/main/java/com/yahoo/docproc/jdisc/RequestContext.java @@ -9,37 +9,35 @@ import java.net.URI; import java.util.List; /** - * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a> + * @author Einar M R Rosenvinge */ public interface RequestContext { - public List<Processing> getProcessings(); + List<Processing> getProcessings(); - public String getServiceName(); + String getServiceName(); - public URI getUri(); + URI getUri(); - public boolean isProcessable(); + boolean isProcessable(); - public int getApproxSize(); + int getApproxSize(); - public int getPriority(); + int getPriority(); - public void processingDone(List<Processing> processing); + void processingDone(List<Processing> processing); - public void processingFailed(ErrorCode error, String msg); + void processingFailed(ErrorCode error, String msg); - public void processingFailed(Exception exception); + void processingFailed(Exception exception); - /** - * Will check if the given timeout has expired - * @return true if the timeout has expired. - */ - public default boolean hasExpired() { return false;} + /** Returns whether this request has timed out */ + default boolean hasExpired() { return false;} - public void skip(); + void skip(); + + enum ErrorCode { - public enum ErrorCode { //transient: ERROR_ABORTED(Response.Status.TEMPORARY_REDIRECT, DocumentProtocol.ERROR_ABORTED), ERROR_BUSY(Response.Status.TEMPORARY_REDIRECT, DocumentProtocol.ERROR_BUSY), @@ -50,7 +48,7 @@ public interface RequestContext { private int discStatus; private int documentProtocolStatus; - private ErrorCode(int discStatus, int documentProtocolStatus) { + ErrorCode(int discStatus, int documentProtocolStatus) { this.discStatus = discStatus; this.documentProtocolStatus = documentProtocolStatus; } @@ -63,4 +61,5 @@ public interface RequestContext { return documentProtocolStatus; } } + } diff --git a/docproc/src/main/java/com/yahoo/docproc/jdisc/messagebus/MessageFactory.java b/docproc/src/main/java/com/yahoo/docproc/jdisc/messagebus/MessageFactory.java index 89f3782da52..702343acd1c 100644 --- a/docproc/src/main/java/com/yahoo/docproc/jdisc/messagebus/MessageFactory.java +++ b/docproc/src/main/java/com/yahoo/docproc/jdisc/messagebus/MessageFactory.java @@ -2,16 +2,24 @@ package com.yahoo.docproc.jdisc.messagebus; import com.yahoo.docproc.Processing; -import com.yahoo.document.*; +import com.yahoo.document.DocumentOperation; +import com.yahoo.document.DocumentPut; +import com.yahoo.document.DocumentRemove; +import com.yahoo.document.DocumentUpdate; import com.yahoo.documentapi.messagebus.loadtypes.LoadType; -import com.yahoo.documentapi.messagebus.protocol.*; +import com.yahoo.documentapi.messagebus.protocol.DocumentMessage; +import com.yahoo.documentapi.messagebus.protocol.DocumentProtocol; +import com.yahoo.documentapi.messagebus.protocol.PutDocumentMessage; +import com.yahoo.documentapi.messagebus.protocol.RemoveDocumentMessage; +import com.yahoo.documentapi.messagebus.protocol.TestAndSetMessage; +import com.yahoo.documentapi.messagebus.protocol.UpdateDocumentMessage; import com.yahoo.log.LogLevel; import com.yahoo.messagebus.Message; import java.util.logging.Logger; /** - * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a> + * @author Einar M R Rosenvinge */ class MessageFactory { @@ -27,26 +35,26 @@ class MessageFactory { } public DocumentMessage fromDocumentOperation(Processing processing, DocumentOperation documentOperation) { - DocumentMessage msg = newMessage(documentOperation); - msg.setLoadType(loadType); - msg.setPriority(priority); - msg.setRoute(requestMsg.getRoute()); - msg.setTimeReceivedNow(); - msg.setTimeRemaining(requestMsg.getTimeRemainingNow()); - msg.getTrace().setLevel(requestMsg.getTrace().getLevel()); + DocumentMessage message = newMessage(documentOperation); + message.setLoadType(loadType); + message.setPriority(priority); + message.setRoute(requestMsg.getRoute()); + message.setTimeReceivedNow(); + message.setTimeRemaining(requestMsg.getTimeRemainingNow()); + message.getTrace().setLevel(requestMsg.getTrace().getLevel()); if (log.isLoggable(LogLevel.DEBUG)) { - log.log(LogLevel.DEBUG, "Created '" + msg.getClass().getName() + - "', route = '" + msg.getRoute() + - "', priority = '" + msg.getPriority().name() + - "', load type = '" + msg.getLoadType() + - "', trace level = '" + msg.getTrace().getLevel() + - "', time remaining = '" + msg.getTimeRemaining() + "'."); + log.log(LogLevel.DEBUG, "Created '" + message.getClass().getName() + + "', route = '" + message.getRoute() + + "', priority = '" + message.getPriority().name() + + "', load type = '" + message.getLoadType() + + "', trace level = '" + message.getTrace().getLevel() + + "', time remaining = '" + message.getTimeRemaining() + "'."); } - return msg; + return message; } private static DocumentMessage newMessage(DocumentOperation documentOperation) { - final TestAndSetMessage message; + TestAndSetMessage message; if (documentOperation instanceof DocumentPut) { message = new PutDocumentMessage(((DocumentPut)documentOperation)); diff --git a/docproc/src/main/java/com/yahoo/docproc/jdisc/messagebus/ProcessingFactory.java b/docproc/src/main/java/com/yahoo/docproc/jdisc/messagebus/ProcessingFactory.java index 49a6020d633..4696c627fe3 100644 --- a/docproc/src/main/java/com/yahoo/docproc/jdisc/messagebus/ProcessingFactory.java +++ b/docproc/src/main/java/com/yahoo/docproc/jdisc/messagebus/ProcessingFactory.java @@ -74,9 +74,8 @@ class ProcessingFactory { Document document = msg.getDocumentPut().getDocument(); String typeName = document.getDataType().getName(); ContainerDocumentConfig.Doctype typeConfig = getDocumentConfig(typeName); - if (typeConfig == null) { - return document; - } + if (typeConfig == null) return document; + return createConcreteDocument(document, typeConfig); } diff --git a/docproc/src/main/java/com/yahoo/docproc/jdisc/messagebus/ResponseMerger.java b/docproc/src/main/java/com/yahoo/docproc/jdisc/messagebus/ResponseMerger.java index 5a5e43c3cf8..d5aee5b5ff3 100644 --- a/docproc/src/main/java/com/yahoo/docproc/jdisc/messagebus/ResponseMerger.java +++ b/docproc/src/main/java/com/yahoo/docproc/jdisc/messagebus/ResponseMerger.java @@ -9,7 +9,6 @@ import com.yahoo.jdisc.handler.ResponseHandler; import com.yahoo.messagebus.Message; import com.yahoo.messagebus.Reply; import com.yahoo.messagebus.TraceNode; -import com.yahoo.messagebus.jdisc.MbusClient; import com.yahoo.messagebus.jdisc.MbusResponse; import com.yahoo.messagebus.jdisc.StatusCodes; @@ -17,7 +16,7 @@ import java.util.ArrayList; import java.util.List; /** - * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a> + * @author Einar M R Rosenvinge */ class ResponseMerger implements ResponseHandler { diff --git a/docproc/src/main/java/com/yahoo/docproc/jdisc/metric/NullMetric.java b/docproc/src/main/java/com/yahoo/docproc/jdisc/metric/NullMetric.java index fe204686d6c..9e88af4abd7 100644 --- a/docproc/src/main/java/com/yahoo/docproc/jdisc/metric/NullMetric.java +++ b/docproc/src/main/java/com/yahoo/docproc/jdisc/metric/NullMetric.java @@ -6,9 +6,10 @@ import com.yahoo.jdisc.Metric; import java.util.Map; /** - * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a> + * @author Einar M R Rosenvinge */ public class NullMetric implements Metric { + @Override public void set(String key, Number val, Context ctx) { } @@ -25,4 +26,5 @@ public class NullMetric implements Metric { private static class NullContext implements Context { private static final NullContext INSTANCE = new NullContext(); } + } diff --git a/docproc/src/main/java/com/yahoo/docproc/proxy/ProxyDocument.java b/docproc/src/main/java/com/yahoo/docproc/proxy/ProxyDocument.java index b540f1c204d..e825db4e21d 100644 --- a/docproc/src/main/java/com/yahoo/docproc/proxy/ProxyDocument.java +++ b/docproc/src/main/java/com/yahoo/docproc/proxy/ProxyDocument.java @@ -32,15 +32,18 @@ import java.util.Map.Entry; import java.util.Set; /** - * This is a facade to a Document, with multiple purposes: <ul> <li>Getters and setters for field data takes possibly - * into account a schema map of field names. <li>We support mapping into struct fields of arbitrary depth using - * from→mystruct.mystruct.myfield </ul> We also enforce the @Accesses annotation(s) of the doc proc which uses this. + * This is a facade to a Document, with two purposes: + * <ul> + * <li>Getters and setters for field data may take into account a schema map of field names. + * <li>Mapping into struct fields of arbitrary depth using from→mystruct.mystruct.myfield + * </ul> + * + * This also enforces the @Accesses annotation(s) of the doc proc which uses this. * * @author Vegard Havdal */ public class ProxyDocument extends Document implements DocumentOperationWrapper { - private static final long serialVersionUID = 1L; private final Map<String, String> fieldMap; private final Set<String> fieldsAllowed = new HashSet<>(); private final String docProcName; @@ -72,7 +75,7 @@ public class ProxyDocument extends Document implements DocumentOperationWrapper * directly, but may refer to a field in a struct contained in it, * in which case the returned Field is only useful for obtaining * the field type; it can't be used for get() and set(). - **/ + */ @Override public Field getField(String fieldName) { if (fieldMap != null && fieldMap.containsKey(fieldName)) { diff --git a/docproc/src/main/java/com/yahoo/docproc/util/JoinerDocumentProcessor.java b/docproc/src/main/java/com/yahoo/docproc/util/JoinerDocumentProcessor.java index 6242be25f86..448d5213e6d 100644 --- a/docproc/src/main/java/com/yahoo/docproc/util/JoinerDocumentProcessor.java +++ b/docproc/src/main/java/com/yahoo/docproc/util/JoinerDocumentProcessor.java @@ -1,7 +1,6 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.docproc.util; -import com.yahoo.component.ComponentId; import com.yahoo.document.DocumentOperation; import com.yahoo.document.DocumentPut; import com.yahoo.document.config.DocumentmanagerConfig; |