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

    https://github.com/apache/incubator-rya/pull/177#discussion_r127792369
  
    --- Diff: 
extras/rya.pcj.fluo/pcj.fluo.app/src/main/java/org/apache/rya/indexing/pcj/fluo/app/query/PeriodicQueryMetadata.java
 ---
    @@ -0,0 +1,291 @@
    +/*
    + * 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.indexing.pcj.fluo.app.query;
    +
    +import java.util.concurrent.TimeUnit;
    +
    +import org.apache.commons.lang3.builder.EqualsBuilder;
    +import org.apache.rya.indexing.pcj.storage.accumulo.VariableOrder;
    +
    +import com.google.common.base.Objects;
    +import com.google.common.base.Preconditions;
    +
    +/**
    + * Metadata that is required for periodic queries in the Rya Fluo 
Application.  
    + * If a periodic query is registered with the Rya Fluo application, the 
BindingSets
    + * are placed into temporal bins according to whether they occur within 
the window of
    + * a period's ending time.  This Metadata is used to create a Bin Id, 
which is equivalent
    + * to the period's ending time, to be inserted into each BindingSet that 
occurs within that
    + * bin.  This is to allow the AggregationUpdater to aggregate the bins by 
grouping on the 
    + * Bin Id.
    + * 
    + */
    +public class PeriodicQueryMetadata extends CommonNodeMetadata {
    +
    +    private String parentNodeId;
    +    private String childNodeId;
    +    private long windowSize;
    +    private long period;
    +    private TimeUnit unit;
    +    private String temporalVariable;
    +
    +    /**
    +     * Constructs an instance of PeriodicQueryMetadata
    +     * @param nodeId - id of periodic query node
    +     * @param varOrder - variable order indicating the order the 
BindingSet results are written in
    +     * @param parentNodeId - id of parent node
    +     * @param childNodeId - id of child node
    +     * @param windowSize - size of window used for filtering
    +     * @param period - period size that indicates frequency of 
notifications
    +     * @param unit - TimeUnit corresponding to window and period
    +     * @param temporalVariable - temporal variable that periodic 
conditions are applied to
    +     */
    +    public PeriodicQueryMetadata(String nodeId, VariableOrder varOrder, 
String parentNodeId, String childNodeId, long windowSize, long period,
    +            TimeUnit unit, String temporalVariable) {
    +        super(nodeId, varOrder);
    +        Preconditions.checkNotNull(parentNodeId);
    +        Preconditions.checkNotNull(childNodeId);
    +        Preconditions.checkNotNull(temporalVariable);
    +        Preconditions.checkNotNull(unit);
    +        Preconditions.checkNotNull(period > 0);
    --- End diff --
    
    = checkNotNull


---
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