Yakov Zhdanov created IGNITE-5069:
-------------------------------------

             Summary: QueryWords example fails with exception
                 Key: IGNITE-5069
                 URL: https://issues.apache.org/jira/browse/IGNITE-5069
             Project: Ignite
          Issue Type: Bug
            Reporter: Yakov Zhdanov
            Priority: Blocker
             Fix For: 2.0


[~sergi.vladykin], please have a look. It may happen so that avg(cnt) in former 
Ignite versions was returned as double for long column. For current master it 
is returned as long and causes exception in formatter. I was able to reproduce 
it on 1.9 also, but did not try other versions.

Steps to reproduce
# start {{ExampleNodeStartup}}
# start {{QueryWords}}
# start {{StreamWords}}

{noformat}
/opt/jdk/jdk1.8.0_121/bin/java...
org.apache.ignite.examples.streaming.wordcount.QueryWords
[18:20:17]    __________  ________________ 
[18:20:17]   /  _/ ___/ |/ /  _/_  __/ __/ 
[18:20:17]  _/ // (7 7    // /  / / / _/   
[18:20:17] /___/\___/_/|_/___/ /_/ /___/  
[18:20:17] 
[18:20:17] ver. 2.1.0-SNAPSHOT#19700101-sha1:DEV
[18:20:17] 2017 Copyright(C) Apache Software Foundation
[18:20:17] 
[18:20:17] Ignite documentation: http://ignite.apache.org
[18:20:17] 
[18:20:17] Quiet mode.
[18:20:17]   ^-- Logging to file 
'/home/yzhdanov/projects/incubator-ignite/work/log/ignite-dbfdab2d.log'
[18:20:17]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false or 
"-v" to ignite.{sh|bat}
[18:20:17] 
[18:20:17] OS: Linux 4.8.0-46-generic amd64
[18:20:17] VM information: Java(TM) SE Runtime Environment 1.8.0_121-b13 Oracle 
Corporation Java HotSpot(TM) 64-Bit Server VM 25.121-b13
[18:20:17] Initial heap size is 246MB (should be no less than 512MB, use 
-Xms512m -Xmx512m).
[18:20:17] Configured plugins:
[18:20:17]   ^-- None
[18:20:17] 
[18:20:17] Message queue limit is set to 0 which may lead to potential OOMEs 
when running cache operations in FULL_ASYNC or PRIMARY_SYNC modes due to 
message queues growth on sender and receiver sides.
[18:20:17] Security status [authentication=off, tls/ssl=off]
[18:20:18] REST protocols do not start on client node. To start the protocols 
on client node set '-DIGNITE_REST_START_ON_CLIENT=true' system property.
[18:20:20] Performance suggestions for grid  (fix if possible)
[18:20:20] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[18:20:20]   ^-- Disable grid events (remove 'includeEventTypes' from 
configuration)
[18:20:20]   ^-- Enable G1 Garbage Collector (add '-XX:+UseG1GC' to JVM options)
[18:20:20]   ^-- Specify JVM heap max size (add '-Xmx<size>[g|G|m|M|k|K]' to 
JVM options)
[18:20:20]   ^-- Set max direct memory size if getting 'OOME: Direct buffer 
memory' (add '-XX:MaxDirectMemorySize=<size>[g|G|m|M|k|K]' to JVM options)
[18:20:20]   ^-- Disable processing of calls to System.gc() (add 
'-XX:+DisableExplicitGC' to JVM options)
[18:20:20] Refer to this page for more performance suggestions: 
https://apacheignite.readme.io/docs/jvm-and-system-tuning
[18:20:20] 
[18:20:20] To start Console Management & Monitoring run ignitevisorcmd.{sh|bat}
[18:20:20] 
[18:20:20] Ignite node started OK (id=dbfdab2d)
[18:20:20] Topology snapshot [ver=2, servers=1, clients=1, CPUs=4, heap=6.8GB]
Query result set is empty.
Query result set is empty.
[18:20:27] Topology snapshot [ver=3, servers=1, clients=2, CPUs=4, heap=10.0GB]
Query results [avg=[18:20:33] Ignite node stopped OK [uptime=00:00:12:733]
Exception in thread "main" java.util.IllegalFormatConversionException: f != 
java.lang.Long
        at 
java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4302)
        at java.util.Formatter$FormatSpecifier.printFloat(Formatter.java:2806)
        at java.util.Formatter$FormatSpecifier.print(Formatter.java:2753)
        at java.util.Formatter.format(Formatter.java:2520)
        at java.io.PrintStream.format(PrintStream.java:970)
        at java.io.PrintStream.printf(PrintStream.java:871)
        at 
org.apache.ignite.examples.streaming.wordcount.QueryWords.main(QueryWords.java:78)

Process finished with exit code 1

{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to