apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tweise <...@git.apache.org>
Subject [GitHub] incubator-apex-core pull request: APEX-103: Add module and dag int...
Date Fri, 04 Dec 2015 07:20:41 GMT
Github user tweise commented on a diff in the pull request:

    https://github.com/apache/incubator-apex-core/pull/148#discussion_r46655149
  
    --- Diff: engine/src/test/java/com/datatorrent/stram/plan/logical/module/TestModuleExpansion.java
---
    @@ -0,0 +1,449 @@
    +/**
    + * 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 com.datatorrent.stram.plan.logical.module;
    +
    +import java.util.ArrayList;
    +import java.util.List;
    +import java.util.Random;
    +
    +import org.junit.Assert;
    +import org.junit.Test;
    +
    +import org.apache.hadoop.conf.Configuration;
    +
    +import com.datatorrent.api.DAG;
    +import com.datatorrent.api.DefaultInputPort;
    +import com.datatorrent.api.DefaultOutputPort;
    +import com.datatorrent.api.InputOperator;
    +import com.datatorrent.api.Module;
    +import com.datatorrent.api.StreamingApplication;
    +import com.datatorrent.api.annotation.InputPortFieldAnnotation;
    +import com.datatorrent.api.annotation.OutputPortFieldAnnotation;
    +import com.datatorrent.common.util.BaseOperator;
    +import com.datatorrent.stram.plan.logical.LogicalPlan;
    +import com.datatorrent.stram.plan.logical.LogicalPlanConfiguration;
    +
    +public class TestModuleExpansion
    +{
    +  public static class DummyInputOperator extends BaseOperator implements InputOperator
    +  {
    +    private int inputOperatorProp = 0;
    +
    +    Random r = new Random();
    +    public transient DefaultOutputPort<Integer> out = new DefaultOutputPort<Integer>();
    +
    +    @Override
    +    public void emitTuples()
    +    {
    +      out.emit(r.nextInt());
    +    }
    +
    +    public int getInputOperatorProp()
    +    {
    +      return inputOperatorProp;
    +    }
    +
    +    public void setInputOperatorProp(int inputOperatorProp)
    +    {
    +      this.inputOperatorProp = inputOperatorProp;
    +    }
    +  }
    +
    +  public static class DummyOperator extends BaseOperator
    --- End diff --
    
    I believe this question was asked already, can't these classes be package scope?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message