You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apex.apache.org by chandnisingh <gi...@git.apache.org> on 2015/12/22 09:46:19 UTC

[GitHub] incubator-apex-core pull request: APEXCORE-291 #resolve #comment u...

GitHub user chandnisingh opened a pull request:

    https://github.com/apache/incubator-apex-core/pull/190

    APEXCORE-291 #resolve #comment using operator instance as default agg…

    …regator when it implements AutoMetric.Aggregator

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/chandnisingh/incubator-apex-core APEXCORE-291

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-apex-core/pull/190.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #190
    
----
commit 5835c0126f015c3e628b99a5d6f50222db6dc7ca
Author: Chandni Singh <cs...@apache.org>
Date:   2015-12-22T08:45:22Z

    APEXCORE-291 #resolve #comment using operator instance as default aggregator when it implements AutoMetric.Aggregator

----


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

[GitHub] incubator-apex-core pull request: APEXCORE-291 #resolve #comment u...

Posted by chinmaykolhatkar <gi...@git.apache.org>.
Github user chinmaykolhatkar commented on a diff in the pull request:

    https://github.com/apache/incubator-apex-core/pull/190#discussion_r48397509
  
    --- Diff: engine/src/main/java/com/datatorrent/stram/plan/logical/MetricAggregatorMeta.java ---
    @@ -0,0 +1,82 @@
    +/**
    + * 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;
    +
    +import java.io.Serializable;
    +import java.util.Collection;
    +import java.util.Map;
    +
    +import javax.validation.constraints.NotNull;
    +
    +import com.google.common.base.Preconditions;
    +
    +import com.datatorrent.api.AutoMetric;
    +
    +public final class MetricAggregatorMeta implements Serializable
    --- End diff --
    
    Can you add javadoc which describes the class.


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

[GitHub] incubator-apex-core pull request: APEXCORE-291 #resolve #comment u...

Posted by tweise <gi...@git.apache.org>.
Github user tweise commented on a diff in the pull request:

    https://github.com/apache/incubator-apex-core/pull/190#discussion_r48306115
  
    --- Diff: engine/src/test/java/com/datatorrent/stram/engine/AutoMetricTest.java ---
    @@ -361,6 +394,31 @@ public int getMyMetric()
         }
       }
     
    +  public static class OperatorAndAggregator extends OperatorWithMetrics implements AutoMetric.Aggregator, Serializable
    --- End diff --
    
    Why Serializable?


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

[GitHub] incubator-apex-core pull request: APEXCORE-291 #resolve #comment u...

Posted by chandnisingh <gi...@git.apache.org>.
Github user chandnisingh commented on the pull request:

    https://github.com/apache/incubator-apex-core/pull/190#issuecomment-166707878
  
    @davidyan74 I updated the test. Please merge


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

[GitHub] incubator-apex-core pull request: APEXCORE-291 #resolve #comment u...

Posted by chandnisingh <gi...@git.apache.org>.
Github user chandnisingh commented on a diff in the pull request:

    https://github.com/apache/incubator-apex-core/pull/190#discussion_r48306947
  
    --- Diff: engine/src/test/java/com/datatorrent/stram/engine/AutoMetricTest.java ---
    @@ -361,6 +394,31 @@ public int getMyMetric()
         }
       }
     
    +  public static class OperatorAndAggregator extends OperatorWithMetrics implements AutoMetric.Aggregator, Serializable
    --- End diff --
    
    This is because OperatorMeta needs to be Serializable. OperatorMeta contains MetricsAggregatorMeta which comprises of AutoMetric.Aggregator and AutoMetric.DimensionScheme.


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

[GitHub] incubator-apex-core pull request: APEXCORE-291 #resolve #comment u...

Posted by davidyan74 <gi...@git.apache.org>.
Github user davidyan74 commented on a diff in the pull request:

    https://github.com/apache/incubator-apex-core/pull/190#discussion_r48283776
  
    --- Diff: engine/src/test/java/com/datatorrent/stram/engine/AutoMetricTest.java ---
    @@ -361,6 +384,15 @@ public int getMyMetric()
         }
       }
     
    +  public static class OperatorAndAggregator extends OperatorWithMetrics implements AutoMetric.Aggregator
    +  {
    +    @Override
    +    public Map<String, Object> aggregate(long windowId, Collection<AutoMetric.PhysicalMetricsContext> physicalMetrics)
    +    {
    +      return null;
    --- End diff --
    
    I think this test aggregator method should actually do something, then verify it in the testDefaultMetricsAggregator method.


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

[GitHub] incubator-apex-core pull request: APEXCORE-291 #resolve #comment u...

Posted by chandnisingh <gi...@git.apache.org>.
Github user chandnisingh commented on the pull request:

    https://github.com/apache/incubator-apex-core/pull/190#issuecomment-166792565
  
    Added the Proxy for MetricsAggregator.  
    Moved MetricAggregatorMeta out of LogicalPlan as that class is more than 2000 lines. 
    Made MetricsAggregatorProxy nested class of MetricsAggregatorMeta


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

[GitHub] incubator-apex-core pull request: APEXCORE-291 #resolve #comment u...

Posted by chandnisingh <gi...@git.apache.org>.
Github user chandnisingh commented on the pull request:

    https://github.com/apache/incubator-apex-core/pull/190#issuecomment-167169821
  
    All the review comments so far have been addressed.


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

[GitHub] incubator-apex-core pull request: APEXCORE-291 #resolve #comment u...

Posted by chandnisingh <gi...@git.apache.org>.
Github user chandnisingh commented on the pull request:

    https://github.com/apache/incubator-apex-core/pull/190#issuecomment-167954925
  
    Squashed the commits


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

[GitHub] incubator-apex-core pull request: APEXCORE-291 #resolve #comment u...

Posted by tweise <gi...@git.apache.org>.
Github user tweise commented on the pull request:

    https://github.com/apache/incubator-apex-core/pull/190#issuecomment-166786401
  
    The operator developer should not have to implement Serializable for this. It's not needed for Partitioner and StatsListener. Have a look at StatsListenerProxy how this can be handled.


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

[GitHub] incubator-apex-core pull request: APEXCORE-291 #resolve #comment u...

Posted by chandnisingh <gi...@git.apache.org>.
Github user chandnisingh commented on the pull request:

    https://github.com/apache/incubator-apex-core/pull/190#issuecomment-166556342
  
    @davidyan74 @siyuanh Please review and merge


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

[GitHub] incubator-apex-core pull request: APEXCORE-291 #resolve #comment u...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-apex-core/pull/190


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

[GitHub] incubator-apex-core pull request: APEXCORE-291 #resolve #comment u...

Posted by chandnisingh <gi...@git.apache.org>.
Github user chandnisingh commented on the pull request:

    https://github.com/apache/incubator-apex-core/pull/190#issuecomment-166997395
  
    @ilooner please review


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