Re: UriDeployment Question

2020-06-04 Thread marble.zh...@coinflex.com
I tried even with the 2.8.1, but exception still there, I have already copied
the ignite-osgi and ignite-osgi-paxlogging libs to the ./libs folder, 

java.lang.NoClassDefFoundError: org/osgi/service/jdbc/DataSourceFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentClassLoader.loadClass(GridUriDeploymentClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentFileResourceLoader.createResource(GridUriDeploymentFileResourceLoader.java:72)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentDiscovery.findResourcesInDirectory(GridUriDeploymentDiscovery.java:109)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentDiscovery.findResourcesInDirectory(GridUriDeploymentDiscovery.java:103)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentDiscovery.findResourcesInDirectory(GridUriDeploymentDiscovery.java:103)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentDiscovery.findResourcesInDirectory(GridUriDeploymentDiscovery.java:103)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentDiscovery.getClasses(GridUriDeploymentDiscovery.java:71)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentFileProcessor.processNoDescriptorFile(GridUriDeploymentFileProcessor.java:388)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentFileProcessor.processFile(GridUriDeploymentFileProcessor.java:108)
at
org.apache.ignite.spi.deployment.uri.UriDeploymentSpi$2.onNewOrUpdatedFile(UriDeploymentSpi.java:587)
at
org.apache.ignite.spi.deployment.uri.scanners.file.UriDeploymentFileScanner$URIContext.handleFile(UriDeploymentFileScanner.java:268)
at
org.apache.ignite.spi.deployment.uri.scanners.file.UriDeploymentFileScanner$URIContext.access$200(UriDeploymentFileScanner.java:135)
at
org.apache.ignite.spi.deployment.uri.scanners.file.UriDeploymentFileScanner$URIContext$1.handle(UriDeploymentFileScanner.java:178)
at
org.apache.ignite.spi.deployment.uri.scanners.GridDeploymentFolderScannerHelper.scanFolder(GridDeploymentFolderScannerHelper.java:49)
at
org.apache.ignite.spi.deployment.uri.scanners.GridDeploymentFolderScannerHelper.scanFolder(GridDeploymentFolderScannerHelper.java:52)
at
org.apache.ignite.spi.deployment.uri.scanners.file.UriDeploymentFileScanner$URIContext.scan(UriDeploymentFileScanner.java:183)
at
org.apache.ignite.spi.deployment.uri.scanners.file.UriDeploymentFileScanner$URIContext.access$000(UriDeploymentFileScanner.java:135)
at
org.apache.ignite.spi.deployment.uri.scanners.file.UriDeploymentFileScanner.scan(UriDeploymentFileScanner.java:73)
at
org.apache.ignite.spi.deployment.uri.scanners.UriDeploymentScannerManager$1.body(UriDeploymentScannerManager.java:115)
at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:61)
Caused by: java.lang.ClassNotFoundException:
org.osgi.service.jdbc.DataSourceFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentClassLoader.loadClass(GridUriDeploymentClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)



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


Re: UriDeployment Question

2020-06-04 Thread marble.zh...@coinflex.com
thanks, i am using 2.8.0 version.

btw, when start the server, met below exception, I am not sure if due to
this issue, 

Caused by: java.lang.ClassNotFoundException:
org.osgi.framework.BundleActivator
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentClassLoader.loadClass(GridUriDeploymentClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 30 more
Exception in thread "grid-uri-scanner-#2" java.lang.NoClassDefFoundError:
org/osgi/framework/BundleActivator
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)



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


Re: How to get POJOs in Python?

2020-06-04 Thread Andrew Munn
Thanks Ilya.  I don't see anything in that post about registering the
binary type.  I am not defining any tables using SQL.  I'm just
instantiating POJOs, putting them in the cache and then expecting to get
them in Python.  Can you tell me what else is required?  Is there some
process to register the binary type?  How can I view all registered binary
types?

Thanks!

On Wed, Jun 3, 2020 at 11:59 AM Ilya Kasnacheev 
wrote:

> Hello!
>
> Have you tried the following example:
>
> https://github.com/apache/ignite/blob/master/modules/platforms/python/examples/read_binary.py
>
> (yes, it mostly works with tables, but tables and POJOs are mapped in the
> same fashion).
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> ср, 3 июн. 2020 г. в 18:54, Andrew Munn :
>
>> I'm having the same issues as these guys:
>>
>>
>> http://mail-archives.apache.org/mod_mbox/ignite-user/201901.mbox/%3csn6pr14mb2240feb74bc77de79b54ca67ca...@sn6pr14mb2240.namprd14.prod.outlook.com%3E
>>
>>
>> I would like to put POJOs in a map and get them using pyignite.  Python
>> gives me ParseError('Binary type is not registered'). I was hoping that
>> Ignite would automatically store any required schema info for the class so
>> Python could use it. Especially if my simple POJO was composed only of
>> primitives.
>>
>> Are there any examples of consuming POJOs from a cache using Python?
>>
>> Thanks
>>
>>


Re: embedded jetty & ignite

2020-06-04 Thread Denis Magda
Clay,

Do you have any specific requirements in mind for the ignite service +
jetty deployment? If possible, please tell us a bit more about your
application.

Generally, I would deploy Jetty separately and use load balancers when
several instances of an application are needed.

-
Denis


On Wed, Jun 3, 2020 at 3:20 PM Clay Teahouse  wrote:

> Thank you, Denis. I'll research this topic further.
>
> Any recommendation for/against using jetty as an embedded servlet
> container, in this case, say, deployed as an ignite service?
>
> On Fri, May 29, 2020 at 11:22 PM Denis Magda  wrote:
>
>> Clay,
>>
>> Just start your Jetty server and deploy as many instances of your web app
>> as needed. Inside the logic of those apps start Ignite server nodes
>> instances. Then, refer to this documentation page for session clustering
>> configuration:
>> https://apacheignite-mix.readme.io/docs/web-session-clustering
>>
>> Also, there were many related questions related to this topic. Try to
>> search for specific by googling for "session clustering with ignite and
>> jetty".
>>
>> Let us know if further help is needed.
>>
>>
>> -
>> Denis
>>
>>
>> On Fri, May 29, 2020 at 6:57 PM Clay Teahouse 
>> wrote:
>>
>>> thank you Denis.
>>> If I want to go with the first option, how would I deploy jetty as
>>> embedded server? Do I deploy it as an ignite service?
>>> How would I do session clustering in this case?
>>>
>>> On Fri, May 29, 2020 at 3:18 PM Denis Magda  wrote:
>>>
 Hi Clay,

 I wouldn't suggest using Ignite's Jetty instance for the deployment of
 your services. Ignite's Jetty primary function is to handle REST requests
 specific to Ignite: https://apacheignite.readme.io/docs/rest-api

 Instead, deploy and manage your restful services separately. Then, if
 the goal is to do a web session clustering, deploy Ignite server nodes in
 the embedded mode making the sessions' caches replicated. Otherwise, deploy
 the server nodes independently and reach the cluster out from the restful
 services using existing Ignite APIs. This tutorial shows how to do the
 latter with Spring Boot:
 https://www.gridgain.com/docs/tutorials/spring/spring_ignite_tutorial

 -
 Denis


 On Fri, May 29, 2020 at 8:25 AM Clay Teahouse 
 wrote:

> hello,
> I understand that ignite comes with embedded jetty server.
> 1) Can I utilize this jetty server to deploy my own restful services
> (using Jersey implementation)? If yes, can you please direct me to some
> examples.
> Further questions:
> 2)How does the ignite embedded jetty work with regard to load
> balancing? Are there multiple instances of the embedded jetty server
> running behind a load balancer? In other words, can I invoke multiple
> instances?
> 2) How does this scheme work with web session clustering?
> 3) Would the ignite node run in server mode?
> 4) I want the jetty sessions access ignite caches (on the server side)
> as the data source for the data returned from the restful services.
>
> Any help and advice would be much appreciated. Thank you
>



Re: UriDeployment Question

2020-06-04 Thread Evgenii Zhuravlev
Hi,

What version of Ignite do you use? It started to work with jar files only
since version 2.8: https://issues.apache.org/jira/browse/IGNITE-11380. When
it reads file, it prints message to the log:

Found new or updated deployment unit

Do you have it in your logs?

Yes, you don't need to restart the cluster in this case, just undeploy the
service, update the jar file and deploy the service again.

Best Regards,
Evgenii

чт, 4 июн. 2020 г. в 05:49, marble.zh...@coinflex.com <
marble.zh...@coinflex.com>:

> Hi Expert,
>
> I am trying the UriDeployment, the xml setting is,
>   
>  class="org.apache.ignite.spi.deployment.uri.UriDeploymentSpi">
> 
> 
>
> file:///home/myProjects/price-processor-ignite/target/
> 
> 
>  value="/home/myProjects/deployment/"/>
> 
> 
>
> When ignite startup, I can find the something generated in the deployment
> folder, but when I try to launch the client to execute methods in my jar,
> but it shows class not found, I am not sure if something I missed.
>
> And btw, if we redeploy the jar into the ./target, we cancel/start the
> service in the jar, ignite will reload the new jar, right? If so, I no need
> to restart the ignite instance.
>
> Thanks again.
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Ignite SystemViews DataRegion

2020-06-04 Thread akorensh
Hi,
  There is a DATA_REGION_NAME in the CACHES and CACHE_GROUPS view mapping a
cache/cache group  
  to a data region.
  https://apacheignite.readme.io/docs/caches


  data region metrics: 
https://apacheignite.readme.io/docs/iodataregiondata_region_name
   
https://apacheignite.readme.io/docs/memory-metrics#enabling-data-storage-metrics


   JMX: https://apacheignite.readme.io/docs/memory-metrics#using-jmx-bean-1
Thanks, Alex  




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


Re: Help with ignite cluster

2020-06-04 Thread akorensh
Hi,
  Fail to find data nodes for cache: *
  means that a call to a partitioned cache is not finding any nodes w/data
for that cache.
  Either the nodes are down, are unresponsive or unreachable.

  If this scenario is reproducible, send the logs from all nodes, a
reproducer, a list of steps to recreate 
  scenario, and I'll take a look
Thanks, Alex



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


Index usage on Joins

2020-06-04 Thread njcstreet
Hi,

I am evaluating Ignite for a data warehouse style system which would have a
central very large "fact" table with potentially billions of records, and
several "dimensions" that describe the data. The fact table would be
partitioned as it is large, and the dimensions would be replicated across
all nodes. I am using the latest version 2.8.

My question is about index usage and joins. I need to join between the fact
table (which has the numerical transaction values), and the dimensions which
describe the data (such as product / location). However it seems that
indexes on the fact table won't be used when joining. I understand that you
can only use one index per table in a query, so I was hoping to use a group
index for the query against the fact table, since there are a few attributes
that users will always filter on. Here is an example schema (heavily
simplified and with little data, but enough to demonstrate that the Explain
plan is not using the index on the Fact table)

CREATE TABLE IF NOT EXISTS FactTableRevenue (

id int PRIMARY KEY,

date_key int,
product_key int,
location_key int,
revenue float

) WITH "template=partitioned,backups=0";

 

CREATE TABLE IF NOT EXISTS DimensionProduct (

id int PRIMARY KEY,
product_name varchar

) WITH "TEMPLATE=REPLICATED";

 

CREATE TABLE IF NOT EXISTS DimensionLocation (

id int PRIMARY KEY,
location_name varchar

)WITH "TEMPLATE=REPLICATED";

 

CREATE INDEX ix_product_product_name ON DimensionProduct(product_name);
CREATE INDEX ix_location_location_name ON DimensionLocation(location_name);
CREATE INDEX ix_revenue_date_product_location ON FactTableRevenue(date_key,
product_key, location_key);

 
INSERT INTO DimensionProduct (id, product_name) VALUES (1, 'Product 1');
INSERT INTO DimensionProduct (id, product_name) VALUES (2, 'Product 2');
INSERT INTO DimensionProduct (id, product_name) VALUES (3, 'Product 3');

INSERT INTO DimensionLocation (id, location_name) VALUES (1, 'London');
INSERT INTO DimensionLocation (id, location_name) VALUES (2, 'Paris');
INSERT INTO DimensionLocation (id, location_name) VALUES (3, 'New York');

INSERT INTO FactTableRevenue (id, date_key, product_key, location_key,
revenue) VALUES
(1, 20200604, 1, 1, 500);

INSERT INTO FactTableRevenue (id, date_key, product_key, location_key,
revenue) VALUES
(2, 20200604, 1, 2, 700);

INSERT INTO FactTableRevenue (id, date_key, product_key, location_key,
revenue) VALUES
(3, 20200604, 1, 3, 90);

INSERT INTO FactTableRevenue (id, date_key, product_key, location_key,
revenue) VALUES
(4, 20200604, 2, 1, 267);

INSERT INTO FactTableRevenue (id, date_key, product_key, location_key,
revenue) VALUES
(5, 20200604, 2, 3, 755);

 

/* 1st example query with no joins but filling in the dimension keys up
front. This utilities the full group index which is great, but not how we
want to query the system as you would have to first run some queries to
determine the keys */

/* PUBLIC.IX_REVENUE_DATE_PRODUCT_LOCATION: LOCATION_KEY IN(1, 2)

AND DATE_KEY = 20200604

AND PRODUCT_KEY = 1

 */

EXPLAIN SELECT f.Date_key,

loc.Location_name,
SUM(f.Revenue)
FROM FactTableRevenue f

INNER JOIN DimensionProduct pr
ON pr._key = f.Product_Key

INNER JOIN DimensionLocation loc
ON loc._key = f.Location_Key


WHERE f.Date_Key = 20200604
AND f.Product_key = 1 -- Filter specifically on key
AND f.Location_Key IN (1, 2) -- Filter specifically on key
GROUP BY f.Date_Key, loc.Location_name

 

/*  Second example - this is how we actually want to query by filtering on
specific dimension attributes. Here, only the date_key is used in the index
because there is no join on it. But product_key and location_key are not
included in the index usage because they are in joins */

-- key which is directly on Fact table

/* PUBLIC.IX_REVENUE_DATE_PRODUCT_LOCATION: DATE_KEY = 20200604 */

EXPLAIN SELECT f.Date_key,
loc.Location_name,
SUM(f.Revenue)
FROM FactTableRevenue f

INNER JOIN DimensionProduct pr
ON pr._key = f.Product_Key

INNER JOIN DimensionLocation loc
ON loc._key = f.Location_Key

WHERE f.Date_Key = 20200604
AND pr.Product_Name = 'Product 1'
AND loc.Location_Name IN ('London', 'Paris')

GROUP BY f.Date_Key, loc.Location_name


Now I know that I could put product_name and location_name directly on the
fact table, however these are not the only attributes that the user may want
to filter on. Also it will result in a much higher data usage because of
having to store strings across billions of rows rather than integers.

Thanks very much for your help!




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


UriDeployment Question

2020-06-04 Thread marble.zh...@coinflex.com
Hi Expert, 

I am trying the UriDeployment, the xml setting is, 
  



   
file:///home/myProjects/price-processor-ignite/target/






When ignite startup, I can find the something generated in the deployment
folder, but when I try to launch the client to execute methods in my jar,
but it shows class not found, I am not sure if something I missed.

And btw, if we redeploy the jar into the ./target, we cancel/start the
service in the jar, ignite will reload the new jar, right? If so, I no need
to restart the ignite instance.

Thanks again.




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


Help with ignite cluster

2020-06-04 Thread C Ravikiran
> Hi Team,
>
> Initially my application running with single node.
>
> Recently added one more node in to the cluster and my application is
> working with two nodes without issues and also fetching data in cache IDs
> also.
>
> But today one node was down which was runnig intially.
>
> Newly added node was running fine.
>
> But we are not able to see the data from newly added node.
>
> Two nodes sync has not done properly.
>
> We are using ignite 2.6 version
>
> Cache mode: partitioned, FULL_SYNC
>
> Could you please help me on this.
> Ignite ui i am getting below error:
> Fail to find data nodes for cache: *
>
> Thanks in advance.
>


Re: Question regarding topology

2020-06-04 Thread adipro
Can someone please help with this case?



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


Re: Messages being Missed on Node Start

2020-06-04 Thread zork
Hi,
Can anyone provide an input on this please?



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


Re: Random2LruPageEvictionTracker causing hanging in our integration tests

2020-06-04 Thread Ilya Kasnacheev
Hello!

If you have a lot of caches of uniform structure and low entry count, you
should use cache groups.

For unrelated caches you should not use cache groups.

That's the rule of thumb.

Regards,
-- 
Ilya Kasnacheev


чт, 4 июн. 2020 г. в 08:41, scottmf :

> Thanks Ilya.  I tried all your suggestions and they work as expected.  I'll
> close the bug.
>
> WRT cache groups, what's the rule of thumb with using cache groups?  I read
> https://apacheignite.readme.io/docs/cache-groups, but I'm not sure on the
> approach I should take.  Should I simply stay away from cache groups until
> I
> need them?  Or should I use them from the start.
>
> What is your suggestion?
>
> thanks.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>