[ 
https://issues.apache.org/jira/browse/RYA-377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16317137#comment-16317137
 ] 

ASF GitHub Bot commented on RYA-377:
------------------------------------

Github user kchilton2 commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/257#discussion_r160263988
  
    --- Diff: 
extras/rya.streams/kafka/src/main/java/org/apache/rya/streams/kafka/processors/join/JoinProcessorSupplier.java
 ---
    @@ -0,0 +1,191 @@
    +/*
    + * 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.
    + */
    +package org.apache.rya.streams.kafka.processors.join;
    +
    +import static java.util.Objects.requireNonNull;
    +
    +import java.util.Iterator;
    +import java.util.List;
    +
    +import org.apache.kafka.streams.processor.Processor;
    +import org.apache.kafka.streams.processor.ProcessorContext;
    +import org.apache.kafka.streams.state.KeyValueStore;
    +import org.apache.rya.api.function.join.IterativeJoin;
    +import org.apache.rya.api.model.VisibilityBindingSet;
    +import org.apache.rya.streams.kafka.processors.ProcessorResult;
    +import 
org.apache.rya.streams.kafka.processors.ProcessorResult.BinaryResult;
    +import 
org.apache.rya.streams.kafka.processors.ProcessorResult.BinaryResult.Side;
    +import org.apache.rya.streams.kafka.processors.ProcessorResultFactory;
    +import org.apache.rya.streams.kafka.processors.RyaStreamsProcessor;
    +import org.apache.rya.streams.kafka.processors.RyaStreamsProcessorSupplier;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
    +import edu.umd.cs.findbugs.annotations.NonNull;
    +
    +/**
    + * Supplies {@link JoinProcessor} instances.
    + */
    +@DefaultAnnotation(NonNull.class)
    +public class JoinProcessorSupplier extends RyaStreamsProcessorSupplier {
    +
    +    private final String stateStoreName;
    +    private final IterativeJoin join;
    +    private final List<String> joinVars;
    +    private final List<String> allVars;
    +
    +    /**
    +     * Constructs an instance of {@link JoinProcessorSupplier}.
    +     *
    +     * @param stateStoreName - The name of the state store the processor 
will use. (not null)
    +     * @param join - The join function the supplied processor will use. 
(not null)
    +     * @param joinVars - The variables that the supplied processor will 
join over. (not null)
    +     * @param allVars - An ordered list of all the variables that may 
appear in resulting Binding Sets.
    +     *   This list must lead with the same variables and order as {@code 
joinVars}. (not null)
    +     * @param resultFactory - The factory that the supplied processors 
will use to create results. (not null)
    +     * @throws IllegalArgumentException Thrown if {@code allVars} does not 
start with {@code joinVars}.
    +     */
    +    public JoinProcessorSupplier(
    +            final String stateStoreName,
    +            final IterativeJoin join,
    +            final List<String> joinVars,
    +            final List<String> allVars,
    +            final ProcessorResultFactory resultFactory) throws 
IllegalArgumentException {
    +        super(resultFactory);
    +        this.stateStoreName = requireNonNull(stateStoreName);
    +        this.join = requireNonNull(join);
    +        this.joinVars = requireNonNull(joinVars);
    +        this.allVars = requireNonNull(allVars);
    +
    +        if(!allVars.subList(0, joinVars.size()).equals(joinVars)) {
    +            throw new IllegalArgumentException("All vars must be lead by 
the join vars, but it did not. " +
    --- End diff --
    
    Updated.


> Implement single node kafka streams incremental SPARQL processor
> ----------------------------------------------------------------
>
>                 Key: RYA-377
>                 URL: https://issues.apache.org/jira/browse/RYA-377
>             Project: Rya
>          Issue Type: New Feature
>            Reporter: Andrew Smith
>            Assignee: Kevin Chilton
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to