apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Ganelin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (APEXMALHAR-998) Compilation error while using UniqueValueCount operator.
Date Tue, 31 May 2016 23:24:12 GMT

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

Ilya Ganelin commented on APEXMALHAR-998:
-----------------------------------------

Is this issue still active?

> Compilation error while using UniqueValueCount operator.
> --------------------------------------------------------
>
>                 Key: APEXMALHAR-998
>                 URL: https://issues.apache.org/jira/browse/APEXMALHAR-998
>             Project: Apache Apex Malhar
>          Issue Type: Bug
>            Reporter: Tushar Gosavi
>            Assignee: Tushar Gosavi
>
> Got compilation error while using UniqueValueCount operator,
> [ERROR] bootstrap class path not set in conjunction with -source 1.6
> /home/tushar/work/github/Malhar/demos/src/main/java/com/datatorrent/demos/uniquevaluetest/Application.java:[31,11]
error: no suitable method found for addStream(String,DefaultOutputPort<KeyValPair<String,Integer>>,DefaultInputPort<KeyValPair<String,Object>>)
> The problem is type  KeyValPair<String, Integer> is different than type <String,
Object> used in operator, generic type needs to be extended from Object for typematch.
> The fix is
> --- a/library/src/main/java/com/datatorrent/lib/algo/UniqueValueCount.java
> +++ b/library/src/main/java/com/datatorrent/lib/algo/UniqueValueCount.java
> @@ -46,10 +46,9 @@ public class UniqueValueCount<K> extends BaseOperator {
>  
>  
>      @InputPortFieldAnnotation(name="inputPort")
> -    public transient DefaultInputPort<KeyValPair<K,Object>> inputPort =
new DefaultInputPort<KeyValPair<K,Object>>() {
> -
> +    public transient DefaultInputPort<KeyValPair<K,? extends Object>> inputPort
= new DefaultInputPort<KeyValPair<K,? extends Object>>() {
>          @Override
> -        public void process(KeyValPair<K, Object> pair) {
> +        public void process(KeyValPair<K, ? extends Object> pair) {
>              Set<Object> values= interimUniqueValues.get(pair.getKey());
>              if(values==null){
>                  values=Sets.newHashSet();



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message