Re: Possible issue with Web Console

2018-08-16 Thread sv
Thank you!  Looking forward to 2.7.
I would suggest escalating this one to 'Critical', since it impacts a very
basic operation of Web Console, the very operation that is promoted in many
Ignite 'get started' videos.  

Thank you,
--Stan



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Source code of latest benchmarks

2018-08-16 Thread eugene miretsky
Hi,

I am trying to write my own benchmark. The Ignite benchmarks github linked
on the website is very old, is there a newer version I could work off?

Cheers,
Eugene


RE: Performance degradation in embed mode

2018-08-16 Thread Kvon, Dmitriy
Hello!

It’s incredible!
Thank you for help!

Dmitriy


From: Ilya Kasnacheev [mailto:ilya.kasnach...@gmail.com]
Sent: Tuesday, August 14, 2018 6:02 PM
To: user@ignite.apache.org
Subject: Re: Performance degradation in embed mode

Hello!

It looks like you have debug enabled when running inside Apache Tomcat.

Turning DEBUG on will make Ignite spend a lot of time and RAM building debug 
messages. Please make sure to turn DEBUG off, at least for org.apache.ignite 
packages.

Regards,


--
Ilya Kasnacheev

2018-08-14 11:45 GMT+03:00 Dmitriy 
mailto:dmitriy.k...@nexign-systems.com>>:
Hello Ilya,

Thank you for the replay.
So, I did ran the test after context initialization, but  the problem is
persists.

dump during test execution


dump after running the test


wbr,

Dmitriy




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/



Apache Ignite SQL- read Only User Creation

2018-08-16 Thread ApacheUser
Hello Ignite team,

We are using  Apache Ignite are SQL reporting cluster . Ignite Persistence
and authenticationEnabled . We need a read only user role apart from ignite
user, is there any role or a way to create user with read only previllages?

Thanks




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: sql query log

2018-08-16 Thread Вячеслав Коптилин
Hello,

If I am not mistaken, there is no such capability out of the box.
You can try to use IgniteConfiguration#longQueryWarningTimeout property as
a workaround.

For example, you can set this property to 1ms. In this case, every SQL
request that spends more than 1ms will be printed in the log as follows:
[2018-01-04 06:32:38,230][WARN ] [IgniteH2Indexing] Query execution is
too long [time=3518 ms, sql='the execution plan of your SQL query will be
printed here"

I hope the workaround will be helpful for debugging purposes.

Thanks,
S.


чт, 16 авг. 2018 г. в 18:22, Som Som <2av10...@gmail.com>:

> hi.
>
> how can i log all the sql queries on the server node side?
>


How to detect sql schema changes and make update

2018-08-16 Thread Dmitry Lazurkin
Hello.

I have cache with query entity. Now I want to add new field to query
entity of existing cache. I take query entity from existing cache and
query entity with new fields, search new field and add it with DLL
'ALTER TABLE'. And now I have problem because query entity from cache
configuration doesn't have new field. How can I make automatic schema
update? May be exists better approach.

I see interesting method QueryEntity#makePatch, but I have no idea how
to use it.

Thank you.




sql query log

2018-08-16 Thread Som Som
hi.

how can i log all the sql queries on the server node side?


Re: ignite.net spring config ( jdbc classpath)

2018-08-16 Thread wt
Brilliant thanks that did the trick.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


答复: data loss using IgniteDataStreamer API

2018-08-16 Thread Huang Meilong
Thank you, i found that autoflus is what i need.


发件人: Ilya Kasnacheev 
发送时间: 2018年8月16日 21:22:10
收件人: user@ignite.apache.org
主题: Re: data loss using IgniteDataStreamer API

Hello!

For starters, I don't see that you do stmr.close() anywhere.

Data Streamer is only guaranteed to write all data to cache after it is closed 
properly.

Regards,

--
Ilya Kasnacheev

2018-08-16 16:19 GMT+03:00 Huang Meilong 
mailto:ims...@outlook.com>>:

Hi all,


I'm use IgniteDataStreamer API to ingest 1,000,000 record to a sql table cache, 
but only 996,626 records,


0: jdbc:ignite:thin://127.0.0.1/> select count(*) from 
APMMETRIC;
++
|COUNT(*)|
++
| 996626 |
++
1 row selected (0.057 seconds)
0: jdbc:ignite:thin://127.0.0.1/>



does ignite data streamer lose data? code snippet as below


IgniteDataStreamer stmr = 
ignite.dataStreamer("APM_METRIC_CACHE");

long start = System.currentTimeMillis();
for (Long l = 0L; l < 1000L; l++) {
long start1 = System.currentTimeMillis();
for (Integer j = 0; j < 1000; j++) {
ApmMetric metric = new ApmMetric(l, "metric_" + j,"CLUSTER-XXX", "host-1", 80.0 
+ (j.doubleValue() / 100.0));
ApmMetricKey metricKey = new ApmMetricKey(l, "metric_" + j,"CLUSTER-XXX", 
"host-1");
stmr.addData(metricKey, metric);
}
long end1 = System.currentTimeMillis();
System.out.println("stream 1000 records cost " + (end1 - start1) + " ms.");
}
long end = System.currentTimeMillis();
System.out.println("stream 100 records cost " + (end - start) + " ms.");


public class ApmMetricKey implements Serializable {
private Long timeStamp;
private String metricName;
private String clusterId;
private String hostName;

public Long getTimeStamp() {
return timeStamp;
}

public void setTimeStamp(Long timeStamp) {
this.timeStamp = timeStamp;
}

public String getMetricName() {
return metricName;
}

public void setMetricName(String metricName) {
this.metricName = metricName;
}

public String getClusterId() {
return clusterId;
}

public void setClusterId(String clusterId) {
this.clusterId = clusterId;
}

public String getHostName() {
return hostName;
}

public void setHostName(String hostName) {
this.hostName = hostName;
}

public ApmMetricKey() {}

public ApmMetricKey(Long timeStamp, String metricName, String clusterId, 
String hostName) {
this.timeStamp = timeStamp;
this.metricName = metricName;
this.clusterId = clusterId;
this.hostName = hostName;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ApmMetricKey that = (ApmMetricKey) o;
return Objects.equals(timeStamp, that.timeStamp) &&
Objects.equals(metricName, that.metricName) &&
Objects.equals(clusterId, that.clusterId) &&
Objects.equals(hostName, that.hostName);
}

@Override
public int hashCode() {
return Objects.hash(timeStamp, metricName, clusterId, hostName);
}

@Override
public String toString() {
return "ApmMetricKey{" +
"timeStamp=" + timeStamp +
", metricName='" + metricName + '\'' +
", clusterId='" + clusterId + '\'' +
", hostName='" + hostName + '\'' +
'}';
}
}




答复: data loss using IgniteDataStreamer API

2018-08-16 Thread Huang Meilong
Thank you, i found that autoflus is what i need.


发件人: Ilya Kasnacheev 
发送时间: 2018年8月16日 21:22:10
收件人: user@ignite.apache.org
主题: Re: data loss using IgniteDataStreamer API

Hello!

For starters, I don't see that you do stmr.close() anywhere.

Data Streamer is only guaranteed to write all data to cache after it is closed 
properly.

Regards,

--
Ilya Kasnacheev

2018-08-16 16:19 GMT+03:00 Huang Meilong 
mailto:ims...@outlook.com>>:

Hi all,


I'm use IgniteDataStreamer API to ingest 1,000,000 record to a sql table cache, 
but only 996,626 records,


0: jdbc:ignite:thin://127.0.0.1/> select count(*) from 
APMMETRIC;
++
|COUNT(*)|
++
| 996626 |
++
1 row selected (0.057 seconds)
0: jdbc:ignite:thin://127.0.0.1/>



does ignite data streamer lose data? code snippet as below


IgniteDataStreamer stmr = 
ignite.dataStreamer("APM_METRIC_CACHE");

long start = System.currentTimeMillis();
for (Long l = 0L; l < 1000L; l++) {
long start1 = System.currentTimeMillis();
for (Integer j = 0; j < 1000; j++) {
ApmMetric metric = new ApmMetric(l, "metric_" + j,"CLUSTER-XXX", "host-1", 80.0 
+ (j.doubleValue() / 100.0));
ApmMetricKey metricKey = new ApmMetricKey(l, "metric_" + j,"CLUSTER-XXX", 
"host-1");
stmr.addData(metricKey, metric);
}
long end1 = System.currentTimeMillis();
System.out.println("stream 1000 records cost " + (end1 - start1) + " ms.");
}
long end = System.currentTimeMillis();
System.out.println("stream 100 records cost " + (end - start) + " ms.");


public class ApmMetricKey implements Serializable {
private Long timeStamp;
private String metricName;
private String clusterId;
private String hostName;

public Long getTimeStamp() {
return timeStamp;
}

public void setTimeStamp(Long timeStamp) {
this.timeStamp = timeStamp;
}

public String getMetricName() {
return metricName;
}

public void setMetricName(String metricName) {
this.metricName = metricName;
}

public String getClusterId() {
return clusterId;
}

public void setClusterId(String clusterId) {
this.clusterId = clusterId;
}

public String getHostName() {
return hostName;
}

public void setHostName(String hostName) {
this.hostName = hostName;
}

public ApmMetricKey() {}

public ApmMetricKey(Long timeStamp, String metricName, String clusterId, 
String hostName) {
this.timeStamp = timeStamp;
this.metricName = metricName;
this.clusterId = clusterId;
this.hostName = hostName;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ApmMetricKey that = (ApmMetricKey) o;
return Objects.equals(timeStamp, that.timeStamp) &&
Objects.equals(metricName, that.metricName) &&
Objects.equals(clusterId, that.clusterId) &&
Objects.equals(hostName, that.hostName);
}

@Override
public int hashCode() {
return Objects.hash(timeStamp, metricName, clusterId, hostName);
}

@Override
public String toString() {
return "ApmMetricKey{" +
"timeStamp=" + timeStamp +
", metricName='" + metricName + '\'' +
", clusterId='" + clusterId + '\'' +
", hostName='" + hostName + '\'' +
'}';
}
}




Re: ignite.net spring config ( jdbc classpath)

2018-08-16 Thread Ilya Kasnacheev
Hello!

I think you will need an unzipped binary release of corresponding version
by that path:
https://ignite.apache.org/download.cgi#binaries
And there you can drop additional jars into libs/ or so I hope.

Regards,

-- 
Ilya Kasnacheev

2018-08-16 17:30 GMT+03:00 wt :

> hi Ilya
>
> thanks for the quick response. I am running this from code using a visual
> studio project so there isn't an ignite home but if i create one and update
> the env variable to use either a windows format for the path or a /folder
> format i get the following error
>
> Apache.Ignite.Core.Common.IgniteException
>   HResult=0x80131500
>  * Message=IGNITE_HOME is not valid: '/ignite'*
>   Source=Apache.Ignite.Core
>
> Do need to do anything specific with that path given that i am running from
> code?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: ignite.net spring config ( jdbc classpath)

2018-08-16 Thread wt
hi Ilya

thanks for the quick response. I am running this from code using a visual
studio project so there isn't an ignite home but if i create one and update
the env variable to use either a windows format for the path or a /folder
format i get the following error

Apache.Ignite.Core.Common.IgniteException
  HResult=0x80131500
 * Message=IGNITE_HOME is not valid: '/ignite'*
  Source=Apache.Ignite.Core
  
Do need to do anything specific with that path given that i am running from
code?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: ignite.net spring config ( jdbc classpath)

2018-08-16 Thread Ilya Kasnacheev
Hello!

.net usually uses external IGNITE_HOME with Ignite binary distribution. You
should put JAR files into its libs\ directory to make Ignite JVM process
use them.

Regards,

-- 
Ilya Kasnacheev

2018-08-16 16:59 GMT+03:00 wt :

> i am playing with getting ignite working on .net and it works nicely with
> standard configs. If i try copy a config that has rmdbs integration it
> doesn't know where to find the jbdc jar file and classpath. Does anyone
> have
> any information on how this can be done ?
>
>
> Caused by: class org.apache.ignite.IgniteCheckedException: Failed to
> instantiate Spring XML application context (make sure all classes used in
> Spring configuration are present at CLASSPATH)
> [springUrl=file:/C:/Users/ww309/source/repos/ignite/
> ignite/ignite_rmdbs.xml]
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


ignite.net spring config ( jdbc classpath)

2018-08-16 Thread wt
i am playing with getting ignite working on .net and it works nicely with
standard configs. If i try copy a config that has rmdbs integration it
doesn't know where to find the jbdc jar file and classpath. Does anyone have
any information on how this can be done ?


Caused by: class org.apache.ignite.IgniteCheckedException: Failed to
instantiate Spring XML application context (make sure all classes used in
Spring configuration are present at CLASSPATH)
[springUrl=file:/C:/Users/ww309/source/repos/ignite/ignite/ignite_rmdbs.xml]




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: data loss using IgniteDataStreamer API

2018-08-16 Thread Ilya Kasnacheev
Hello!

For starters, I don't see that you do stmr.close() anywhere.

Data Streamer is only guaranteed to write all data to cache after it is
closed properly.

Regards,

-- 
Ilya Kasnacheev

2018-08-16 16:19 GMT+03:00 Huang Meilong :

> Hi all,
>
>
> I'm use IgniteDataStreamer API to ingest 1,000,000 record to a sql table
> cache, but only 996,626 records,
>
>
> 0: jdbc:ignite:thin://127.0.0.1/> select count(*) from APMMETRIC;
> ++
> |COUNT(*)|
> ++
> | 996626 |
> ++
> 1 row selected (0.057 seconds)
> 0: jdbc:ignite:thin://127.0.0.1/>
>
>
> does ignite data streamer lose data? code snippet as below
>
>
> IgniteDataStreamer stmr = 
> ignite.dataStreamer("APM_METRIC_CACHE");
>
> long start = System.currentTimeMillis();
> for (Long l = 0L; l < 1000L; l++) {
> long start1 = System.currentTimeMillis();
> for (Integer j = 0; j < 1000; j++) {
> ApmMetric metric = new ApmMetric(l, "metric_" + j,"CLUSTER-XXX", "host-1",
> 80.0 + (j.doubleValue() / 100.0));
> ApmMetricKey metricKey = new ApmMetricKey(l, "metric_" + j,"CLUSTER-XXX",
> "host-1");
> stmr.addData(metricKey, metric);
> }
> long end1 = System.currentTimeMillis();
> System.out.println("stream 1000 records cost " + (end1 - start1) + " ms.")
> ;
> }
> long end = System.currentTimeMillis();
> System.out.println("stream 100 records cost " + (end - start) + " ms."
> );
>
>
> public class ApmMetricKey implements Serializable {
> private Long timeStamp;
> private String metricName;
> private String clusterId;
> private String hostName;
>
> public Long getTimeStamp() {
> return timeStamp;
> }
>
> public void setTimeStamp(Long timeStamp) {
> this.timeStamp = timeStamp;
> }
>
> public String getMetricName() {
> return metricName;
> }
>
> public void setMetricName(String metricName) {
> this.metricName = metricName;
> }
>
> public String getClusterId() {
> return clusterId;
> }
>
> public void setClusterId(String clusterId) {
> this.clusterId = clusterId;
> }
>
> public String getHostName() {
> return hostName;
> }
>
> public void setHostName(String hostName) {
> this.hostName = hostName;
> }
>
> public ApmMetricKey() {}
>
> public ApmMetricKey(Long timeStamp, String metricName, String clusterId, 
> String hostName) {
> this.timeStamp = timeStamp;
> this.metricName = metricName;
> this.clusterId = clusterId;
> this.hostName = hostName;
> }
>
> @Override
> public boolean equals(Object o) {
> if (this == o) return true;
> if (o == null || getClass() != o.getClass()) return false;
> ApmMetricKey that = (ApmMetricKey) o;
> return Objects.equals(timeStamp, that.timeStamp) &&
> Objects.equals(metricName, that.metricName) &&
> Objects.equals(clusterId, that.clusterId) &&
> Objects.equals(hostName, that.hostName);
> }
>
> @Override
> public int hashCode() {
> return Objects.hash(timeStamp, metricName, clusterId, hostName);
> }
>
> @Override
> public String toString() {
> return "ApmMetricKey{" +
> "timeStamp=" + timeStamp +
> ", metricName='" + metricName + '\'' +
> ", clusterId='" + clusterId + '\'' +
> ", hostName='" + hostName + '\'' +
> '}';
> }
> }
>
>
>


data loss using IgniteDataStreamer API

2018-08-16 Thread Huang Meilong
Hi all,


I'm use IgniteDataStreamer API to ingest 1,000,000 record to a sql table cache, 
but only 996,626 records,


0: jdbc:ignite:thin://127.0.0.1/> select count(*) from APMMETRIC;
++
|COUNT(*)|
++
| 996626 |
++
1 row selected (0.057 seconds)
0: jdbc:ignite:thin://127.0.0.1/>



does ignite data streamer lose data? code snippet as below


IgniteDataStreamer stmr = 
ignite.dataStreamer("APM_METRIC_CACHE");

long start = System.currentTimeMillis();
for (Long l = 0L; l < 1000L; l++) {
long start1 = System.currentTimeMillis();
for (Integer j = 0; j < 1000; j++) {
ApmMetric metric = new ApmMetric(l, "metric_" + j,"CLUSTER-XXX", "host-1", 80.0 
+ (j.doubleValue() / 100.0));
ApmMetricKey metricKey = new ApmMetricKey(l, "metric_" + j,"CLUSTER-XXX", 
"host-1");
stmr.addData(metricKey, metric);
}
long end1 = System.currentTimeMillis();
System.out.println("stream 1000 records cost " + (end1 - start1) + " ms.");
}
long end = System.currentTimeMillis();
System.out.println("stream 100 records cost " + (end - start) + " ms.");


public class ApmMetricKey implements Serializable {
private Long timeStamp;
private String metricName;
private String clusterId;
private String hostName;

public Long getTimeStamp() {
return timeStamp;
}

public void setTimeStamp(Long timeStamp) {
this.timeStamp = timeStamp;
}

public String getMetricName() {
return metricName;
}

public void setMetricName(String metricName) {
this.metricName = metricName;
}

public String getClusterId() {
return clusterId;
}

public void setClusterId(String clusterId) {
this.clusterId = clusterId;
}

public String getHostName() {
return hostName;
}

public void setHostName(String hostName) {
this.hostName = hostName;
}

public ApmMetricKey() {}

public ApmMetricKey(Long timeStamp, String metricName, String clusterId, 
String hostName) {
this.timeStamp = timeStamp;
this.metricName = metricName;
this.clusterId = clusterId;
this.hostName = hostName;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ApmMetricKey that = (ApmMetricKey) o;
return Objects.equals(timeStamp, that.timeStamp) &&
Objects.equals(metricName, that.metricName) &&
Objects.equals(clusterId, that.clusterId) &&
Objects.equals(hostName, that.hostName);
}

@Override
public int hashCode() {
return Objects.hash(timeStamp, metricName, clusterId, hostName);
}

@Override
public String toString() {
return "ApmMetricKey{" +
"timeStamp=" + timeStamp +
", metricName='" + metricName + '\'' +
", clusterId='" + clusterId + '\'' +
", hostName='" + hostName + '\'' +
'}';
}
}



Re: Ignite benchamrking issue

2018-08-16 Thread akurbanov
Hi,

Could you elaborate any error details? Where do you see it, do you have any
logs available?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: how ignite c++ node set baselinetopology

2018-08-16 Thread Igor Sapego
Filed a ticket: [1]

[1] - https://issues.apache.org/jira/browse/IGNITE-9293

Best Regards,
Igor


On Thu, Aug 16, 2018 at 3:28 AM Denis Magda  wrote:

> Igor,
>
> I think it's reasonable to add the baseline topology APIs to C++. Can you
> plan this for the nearest releases?
>
> Pave, do you have time to do the same for .Net?
>
> --
> Denis
>
> -- Forwarded message -
> From: aealexsandrov 
> Date: Tue, Aug 14, 2018 at 3:23 AM
> Subject: Re: how ignite c++ node set baselinetopology
> To: 
>
>
> Hi,
>
> C++ API doesn't contain the methods to update the baseline. So, in this
> case, you can use Java API for it:
>
> Add the code that will listen to the EVT_NODE_JOINED event
>
> private final IgniteEx ignite;
>
> ignite.events().localListen(event -> {
> DiscoveryEvent e = (DiscoveryEvent)event;
>
> final long topVer = e.topologyVersion();
>
> ignite.cluster().setBaselineTopology(topVer);
>
> return true;
> }, EventType.EVT_NODE_JOINED);
>
> The whole example you can see here:
>
>
> https://apacheignite.readme.io/docs/baseline-topology#section-triggering-rebalancing-programmatically
>
> BR,
> Andrei
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


答复: problem when streaming data to a sql table

2018-08-16 Thread Huang Meilong
i resolved it by setting KEY_TYPE and VALUE_TYPE.


发件人: Huang Meilong 
发送时间: 2018年8月16日 17:42:33
收件人: user@ignite.apache.org
主题: problem when streaming data to a sql table


Hi,


I'm streaming data to a sql table like this,


'''

public static void main(String[] args) throws Exception {
Class.forName("org.apache.ignite.IgniteJdbcThinDriver");
Connection conn = 
DriverManager.getConnection("jdbc:ignite:thin://worker-1/");
System.out.println("started jdbc connection...");
// Create database tables
Statement stmt = conn.createStatement();

// Create table based on PARTITIONED template with one backup
stmt.executeUpdate("drop table if EXISTS MX;");
stmt.executeUpdate("CREATE TABLE IF NOT EXISTS MX (" +
" timeStamp LONG, metricName VARCHAR, clusterId VARCHAR, 
hostName VARCHAR, metricValue FLOAT," +
" PRIMARY KEY (timeStamp, metricName, clusterId, hostName)) " +
" WITH \"backups=1, CACHE_NAME=MX, 
DATA_REGION=MX_24GB_Region\"");

stmt.executeUpdate("CREATE INDEX idx_timestamp_v1 ON MX (timeStamp)");
stmt.executeUpdate("CREATE INDEX idx_metric_name_v1 ON MX 
(metricName)");
stmt.executeUpdate("CREATE INDEX idx_cluster_id_v1 ON MX (clusterId)");
stmt.executeUpdate("CREATE INDEX idx_hostname_v1 ON MX (hostName)");

System.out.println("created table...");

Ignition.setClientMode(true);
IgniteConfiguration cfg = new IgniteConfiguration();

TcpDiscoveryVmIpFinder ipFinder1 = new TcpDiscoveryVmIpFinder();
ipFinder1.setAddresses(Arrays.asList("worker-1:47500..47502", 
"worker-2:47500..47502", "worker-3:47500..47502"));


TcpDiscoverySpi discoverySpi = new TcpDiscoverySpi();
TcpDiscoveryMulticastIpFinder ipFinder = new 
TcpDiscoveryMulticastIpFinder();
ipFinder.setAddresses(Arrays.asList("worker-1:47500..47502", 
"worker-2:47500..47502", "worker-3:47500..47502"));
discoverySpi.setIpFinder(ipFinder);
cfg.setDiscoverySpi(discoverySpi);
//cfg.setActiveOnStart(true);

Ignite ignite = Ignition.start(cfg);

System.out.println("start ignite...");

IgniteCache stmCache = ignite.getOrCreateCache("MX");

IgniteDataStreamer stmr = 
ignite.dataStreamer(stmCache.getName());

MX mx = new MX();
mx.setClusterId("MX");
mx.setMetricName("metric");
mx.setHostName("host-1");
mx.setMetricValue(80.0);
stmr.addData("MX", mx);

try (ResultSet rs =
 stmt.executeQuery("SELECT AVG(metricValue) FROM MX")) {
System.out.println("Query result:");
while (rs.next())
System.out.println(">>>" + rs.getString(1));
}

}


'''


after putting data to the streamer, the result set is empty where execute query 
on that table.


class MX is as below:


public class MX implements Serializable {

@QuerySqlField(index = true)
private Long timesTamp;

@QuerySqlField(index = true)
private String metricName;

@QuerySqlField(index = true)
private String clusterId;

@QuerySqlField(index = true)
private String hostName;

@QuerySqlField
private Double metricValue;

public Long getTimesTamp() {
return timesTamp;
}

public void setTimesTamp(Long timesTamp) {
this.timesTamp = timesTamp;
}

public String getMetricName() {
return metricName;
}

public void setMetricName(String metricName) {
this.metricName = metricName;
}

public String getClusterId() {
return clusterId;
}

public void setClusterId(String clusterId) {
this.clusterId = clusterId;
}

public String getHostName() {
return hostName;
}

public void setHostName(String hostName) {
this.hostName = hostName;
}

public Double getMetricValue() {
return metricValue;
}

public void setMetricValue(Double metricValue) {
this.metricValue = metricValue;
}
}


can anyone give me some suggestions, thank you very much!




Re: Ignite SQL Queries not getting all data back in ignite 2.4 and 2.6

2018-08-16 Thread yfernando
Thanks Vlad / Dmitry, I was able to download the nightly build from teamcity
as a guest.

However I'm now getting the following error when trying to add data to the
cache. Any ideas?

class org.apache.ignite.IgniteException: Failed to get affinity mapping from
node: TcpDiscoveryNode [id=eeef1e32-db85-4425-8718-29884d9af6d0,
addrs=ArrayList [0:0:0:0:0:0:0:1%lo, 10.32.50.59, 127.0.0.1],
sockAddrs=HashSet [/0:0:0:0:0:0:0:1%lo:47500, /127.0.0.1:47500,
appl183-stc.global.tudor.com/10.32.50.59:47500], discPort=47500, order=3,
intOrder=3, lastExchangeTime=1534414697561, loc=false,
ver=2.7.0#19691231-sha1:, isClient=false]
at
org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:990)
at
org.apache.ignite.internal.IgniteComputeImpl.affinityRunAsync0(IgniteComputeImpl.java:186)
at
org.apache.ignite.internal.IgniteComputeImpl.affinityRun(IgniteComputeImpl.java:145)
at
com.tudor.datagridI.client.TradeOrderStoreHelper.processOrderHolders(TradeOrderStoreHelper.java:30)
at
com.tudor.datagridI.TradingDataAccessImpl.saveOrders(TradingDataAccessImpl.java:294)
at
orderserver.client.GridClient.updatePreparedOrderHoldersInGrid(GridClient.java:180)
at
orderserver.client.GridClient.updateOrderHoldersInGrid(GridClient.java:135)
at orderserver.OrderFactory.saveOrders(OrderFactory.java:6705)
at orderserver.OrderFactory.saveOrders(OrderFactory.java:6620)
at
com.tudor.test.performancetest.PerformanceTester$CurrencyBooker.run(PerformanceTester.java:286)
at
java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1626)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to get
affinity mapping from node: TcpDiscoveryNode
[id=eeef1e32-db85-4425-8718-29884d9af6d0, addrs=ArrayList
[0:0:0:0:0:0:0:1%lo, 10.32.50.59, 127.0.0.1], sockAddrs=HashSet
[/0:0:0:0:0:0:0:1%lo:47500, /127.0.0.1:47500,
appl183-stc.global.tudor.com/10.32.50.59:47500], discPort=47500, order=3,
intOrder=3, lastExchangeTime=1534414697561, loc=false,
ver=2.7.0#19691231-sha1:, isClient=false]
at
org.apache.ignite.internal.processors.affinity.GridAffinityProcessor.affinityCache(GridAffinityProcessor.java:515)
at
org.apache.ignite.internal.processors.affinity.GridAffinityProcessor.affinityKey(GridAffinityProcessor.java:342)
at
org.apache.ignite.internal.IgniteComputeImpl.affinityRunAsync0(IgniteComputeImpl.java:176)
... 12 more
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to
unmarshal object with optimized marshaller
at
org.apache.ignite.internal.util.IgniteUtils.unmarshal(IgniteUtils.java:10025)
at
org.apache.ignite.internal.processors.task.GridTaskWorker.onResponse(GridTaskWorker.java:830)
at
org.apache.ignite.internal.processors.task.GridTaskProcessor.processJobExecuteResponse(GridTaskProcessor.java:1077)
at
org.apache.ignite.internal.processors.task.GridTaskProcessor$JobMessageListener.onMessage(GridTaskProcessor.java:1312)
at
org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1556)
at
org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1184)
at
org.apache.ignite.internal.managers.communication.GridIoManager.access$4200(GridIoManager.java:125)
at
org.apache.ignite.internal.managers.communication.GridIoManager$9.run(GridIoManager.java:1091)
... 3 more
Caused by: class org.apache.ignite.binary.BinaryObjectException: Failed to
unmarshal object with optimized marshaller
at
org.apache.ignite.internal.binary.BinaryUtils.doReadOptimized(BinaryUtils.java:1765)
at
org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(BinaryReaderExImpl.java:1964)
at
org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1716)
at
org.apache.ignite.internal.binary.GridBinaryMarshaller.deserialize(GridBinaryMarshaller.java:313)
at
org.apache.ignite.internal.binary.BinaryMarshaller.unmarshal0(BinaryMarshaller.java:102)
at
org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:82)
at
org.apache.ignite.internal.util.IgniteUtils.unmarshal(IgniteUtils.java:10019)
... 10 more
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to
deserialize object with given class loader:
[clsLdr=sun.misc.Launcher$AppClassLoader@18b4aac2, err=Failed to deserialize
object [typeName=org.apache.ignite.internal.util.lang.GridTuple3]]
at

problem when streaming data to a sql table

2018-08-16 Thread Huang Meilong
Hi,


I'm streaming data to a sql table like this,


'''

public static void main(String[] args) throws Exception {
Class.forName("org.apache.ignite.IgniteJdbcThinDriver");
Connection conn = 
DriverManager.getConnection("jdbc:ignite:thin://worker-1/");
System.out.println("started jdbc connection...");
// Create database tables
Statement stmt = conn.createStatement();

// Create table based on PARTITIONED template with one backup
stmt.executeUpdate("drop table if EXISTS MX;");
stmt.executeUpdate("CREATE TABLE IF NOT EXISTS MX (" +
" timeStamp LONG, metricName VARCHAR, clusterId VARCHAR, 
hostName VARCHAR, metricValue FLOAT," +
" PRIMARY KEY (timeStamp, metricName, clusterId, hostName)) " +
" WITH \"backups=1, CACHE_NAME=MX, 
DATA_REGION=MX_24GB_Region\"");

stmt.executeUpdate("CREATE INDEX idx_timestamp_v1 ON MX (timeStamp)");
stmt.executeUpdate("CREATE INDEX idx_metric_name_v1 ON MX 
(metricName)");
stmt.executeUpdate("CREATE INDEX idx_cluster_id_v1 ON MX (clusterId)");
stmt.executeUpdate("CREATE INDEX idx_hostname_v1 ON MX (hostName)");

System.out.println("created table...");

Ignition.setClientMode(true);
IgniteConfiguration cfg = new IgniteConfiguration();

TcpDiscoveryVmIpFinder ipFinder1 = new TcpDiscoveryVmIpFinder();
ipFinder1.setAddresses(Arrays.asList("worker-1:47500..47502", 
"worker-2:47500..47502", "worker-3:47500..47502"));


TcpDiscoverySpi discoverySpi = new TcpDiscoverySpi();
TcpDiscoveryMulticastIpFinder ipFinder = new 
TcpDiscoveryMulticastIpFinder();
ipFinder.setAddresses(Arrays.asList("worker-1:47500..47502", 
"worker-2:47500..47502", "worker-3:47500..47502"));
discoverySpi.setIpFinder(ipFinder);
cfg.setDiscoverySpi(discoverySpi);
//cfg.setActiveOnStart(true);

Ignite ignite = Ignition.start(cfg);

System.out.println("start ignite...");

IgniteCache stmCache = ignite.getOrCreateCache("MX");

IgniteDataStreamer stmr = 
ignite.dataStreamer(stmCache.getName());

MX mx = new MX();
mx.setClusterId("MX");
mx.setMetricName("metric");
mx.setHostName("host-1");
mx.setMetricValue(80.0);
stmr.addData("MX", mx);

try (ResultSet rs =
 stmt.executeQuery("SELECT AVG(metricValue) FROM MX")) {
System.out.println("Query result:");
while (rs.next())
System.out.println(">>>" + rs.getString(1));
}

}


'''


after putting data to the streamer, the result set is empty where execute query 
on that table.


class MX is as below:


public class MX implements Serializable {

@QuerySqlField(index = true)
private Long timesTamp;

@QuerySqlField(index = true)
private String metricName;

@QuerySqlField(index = true)
private String clusterId;

@QuerySqlField(index = true)
private String hostName;

@QuerySqlField
private Double metricValue;

public Long getTimesTamp() {
return timesTamp;
}

public void setTimesTamp(Long timesTamp) {
this.timesTamp = timesTamp;
}

public String getMetricName() {
return metricName;
}

public void setMetricName(String metricName) {
this.metricName = metricName;
}

public String getClusterId() {
return clusterId;
}

public void setClusterId(String clusterId) {
this.clusterId = clusterId;
}

public String getHostName() {
return hostName;
}

public void setHostName(String hostName) {
this.hostName = hostName;
}

public Double getMetricValue() {
return metricValue;
}

public void setMetricValue(Double metricValue) {
this.metricValue = metricValue;
}
}


can anyone give me some suggestions, thank you very much!




Ignite benchamrking issue

2018-08-16 Thread debashissinha
Hi All,

I have an ignite distribution running on yarn.

I have connected to the worker node and done normal operation using client
server mode.

But however when I try to benchmark the same and mention the worker nodes 
as remote server in my benchmark-remote.properties and
ignite-remote-config.xml it is giving me permission denied error.

Can somebody advise me on this .

Thanks & Regards
Debashis Sinha



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Ignite SQL Queries not getting all data back in ignite 2.4 and 2.6

2018-08-16 Thread Vladimir Ozerov
Dmitriy,

I wanted to suggest this, but looks like we do not have direct links for
regular distribution. User can download it from TeamCity, but
username/password is needed for this. May be I missing something.

On Thu, Aug 16, 2018 at 11:44 AM Dmitriy Setrakyan 
wrote:

> I also want to point out that Ignite has nightly builds, so you can try
> them instead of doing your own build as well.
>
> https://ignite.apache.org/download.cgi#nightly-builds
>
> D.
>
> On Thu, Aug 16, 2018 at 1:38 AM, Vladimir Ozerov 
> wrote:
>
>> Hi,
>>
>> There were a lot of changes in the product since 2.3 which may affect it.
>> Most important change was baseline topology, as already mentioned.
>> I am aware of a case when incorrect result might be returned [1], which
>> is already fixed in *master*. Not sure if this is the same issue, but
>> you may try to build Ignite from recent master and check if the problem is
>> still there.
>>
>> Is it possible to create isolated reproducer for this issue?
>>
>> [1] https://issues.apache.org/jira/browse/IGNITE-8900
>>
>> On Wed, Aug 15, 2018 at 11:34 PM bintisepaha 
>> wrote:
>>
>>> Thanks for getting back, but we do not use Ignite's native persistence.
>>> Anything else changed from 2.3 to 2.4 to cause this around SQL Queries?
>>>
>>>
>>>
>>>
>>> --
>>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>>
>>
>


Re: Ignite SQL Queries not getting all data back in ignite 2.4 and 2.6

2018-08-16 Thread Dmitriy Setrakyan
I also want to point out that Ignite has nightly builds, so you can try
them instead of doing your own build as well.

https://ignite.apache.org/download.cgi#nightly-builds

D.

On Thu, Aug 16, 2018 at 1:38 AM, Vladimir Ozerov 
wrote:

> Hi,
>
> There were a lot of changes in the product since 2.3 which may affect it.
> Most important change was baseline topology, as already mentioned.
> I am aware of a case when incorrect result might be returned [1], which is
> already fixed in *master*. Not sure if this is the same issue, but you
> may try to build Ignite from recent master and check if the problem is
> still there.
>
> Is it possible to create isolated reproducer for this issue?
>
> [1] https://issues.apache.org/jira/browse/IGNITE-8900
>
> On Wed, Aug 15, 2018 at 11:34 PM bintisepaha 
> wrote:
>
>> Thanks for getting back, but we do not use Ignite's native persistence.
>> Anything else changed from 2.3 to 2.4 to cause this around SQL Queries?
>>
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>


Re: Ignite SQL Queries not getting all data back in ignite 2.4 and 2.6

2018-08-16 Thread Vladimir Ozerov
Hi,

There were a lot of changes in the product since 2.3 which may affect it.
Most important change was baseline topology, as already mentioned.
I am aware of a case when incorrect result might be returned [1], which is
already fixed in *master*. Not sure if this is the same issue, but you may
try to build Ignite from recent master and check if the problem is still
there.

Is it possible to create isolated reproducer for this issue?

[1] https://issues.apache.org/jira/browse/IGNITE-8900

On Wed, Aug 15, 2018 at 11:34 PM bintisepaha  wrote:

> Thanks for getting back, but we do not use Ignite's native persistence.
> Anything else changed from 2.3 to 2.4 to cause this around SQL Queries?
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>