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

    https://github.com/apache/incubator-rya/pull/177#discussion_r127799075
  
    --- Diff: 
extras/rya.periodic.service/periodic.service.notification/src/main/java/org/apache/rya/periodic/notification/processor/TimestampedNotificationProcessor.java
 ---
    @@ -0,0 +1,206 @@
    +/*
    + * 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.periodic.notification.processor;
    +
    +import java.util.Optional;
    +import java.util.concurrent.BlockingQueue;
    +import java.util.concurrent.atomic.AtomicBoolean;
    +
    +import org.apache.log4j.Logger;
    +import org.apache.rya.indexing.pcj.storage.PeriodicQueryResultStorage;
    +import 
org.apache.rya.indexing.pcj.storage.PrecomputedJoinStorage.CloseableIterator;
    +import org.apache.rya.periodic.notification.api.BinPruner;
    +import org.apache.rya.periodic.notification.api.NodeBin;
    +import org.apache.rya.periodic.notification.api.NotificationProcessor;
    +import org.apache.rya.periodic.notification.exporter.BindingSetRecord;
    +import 
org.apache.rya.periodic.notification.exporter.KafkaPeriodicBindingSetExporter;
    +import 
org.apache.rya.periodic.notification.notification.TimestampedNotification;
    +import org.openrdf.query.BindingSet;
    +
    +import com.google.common.base.Preconditions;
    +
    +/**
    + * Implementation of {@link NotificationProcessor} that uses the id 
indicated by
    + * the {@link TimestampedNotification} to obtain results from the
    + * {@link PeriodicQueryResultStorage} layer containing the results of the
    + * Periodic Query. The TimestampedNotificationProcessor then parses the 
results
    + * and adds them to work queues to be processed by the {@link BinPruner} 
and the
    + * {@link KafkaPeriodicBindingSetExporter}.
    + *
    + */
    +public class TimestampedNotificationProcessor implements 
NotificationProcessor, Runnable {
    +
    +    private static final Logger log = 
Logger.getLogger(TimestampedNotificationProcessor.class);
    +    private PeriodicQueryResultStorage periodicStorage;
    +    private BlockingQueue<TimestampedNotification> notifications; // 
notifications
    +                                                                  // to 
process
    +    private BlockingQueue<NodeBin> bins; // entries to delete from Fluo
    +    private BlockingQueue<BindingSetRecord> bindingSets; // query results 
to export
    +    private AtomicBoolean closed = new AtomicBoolean(false);
    +    private int threadNumber;
    +    
    +
    +    public TimestampedNotificationProcessor(PeriodicQueryResultStorage 
periodicStorage,
    +            BlockingQueue<TimestampedNotification> notifications, 
BlockingQueue<NodeBin> bins, BlockingQueue<BindingSetRecord> bindingSets,
    +            int threadNumber) {
    +        Preconditions.checkNotNull(notifications);
    +        Preconditions.checkNotNull(bins);
    +        Preconditions.checkNotNull(bindingSets);
    --- End diff --
    
    here


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to