performance of jdbc mode
dear ignite gurus, I have 2 questions about ignite jdbc: 1. why ignite creates two jdbc driver: jdbc thin vs. jdbc client node 2. I tried the jdbc client node driver lots of times on loading data from Oracle. it is about 6k+ rows. and the sql statement - "select xxx/count (*)" takes more ms than query from oracle directly. for instance: select count(*) takes 300ms but takes 30ms on oracle directly. so please clarify the ignite jdbc performance advantage, thanks really ~~~ -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/performance-of-jdbc-mode-tp16085.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
encounter issue on ignite 2.0
dear experts, I got the following error when start up my ignite 2.0 with exported cluster project: Caused by: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "CREATE INDEX PRIMARY[*] ON ""CartentriesCache_62_20_v1"".CARTENTRIES (""PK"" ASC, ""_KEY"" ASC) "; expected "identifier"; SQL statement: CREATE INDEX PRIMARY ON "CartentriesCache_62_20_v1".Cartentries ("PK" ASC, "_KEY" ASC) [42001-195] at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) at org.h2.message.DbException.getSyntaxError(DbException.java:205) at org.h2.command.Parser.readIdentifierWithSchema(Parser.java:3197) at org.h2.command.Parser.parseCreate(Parser.java:4374) at org.h2.command.Parser.parsePrepared(Parser.java:365) at org.h2.command.Parser.parse(Parser.java:320) at org.h2.command.Parser.parse(Parser.java:292) at org.h2.command.Parser.prepareCommand(Parser.java:257) at org.h2.engine.Session.prepareLocal(Session.java:573) at org.h2.engine.Session.prepareCommand(Session.java:514) at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1204) at org.h2.jdbc.JdbcPreparedStatement.(JdbcPreparedStatement.java:73) at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:288) at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.prepareStatement(IgniteH2Indexing.java:482) at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSql(IgniteH2Indexing.java:870) ... 16 more \\ seems the internal h2 want to create index with name of "primary"?! please advise, thanks. -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/encounter-issue-on-ignite-2-0-tp13812.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: insert/update/delete issue in Version 1.8
Hi Denis, thank you. it works. I manually... added these line... something like " Set keyFlds = new HashSet<>(); keyFlds.add("pk"); qryEntity.setKeyFields(keyFlds); " after that , no more exception there. I am wondering... so I reviewed the "model" section of web console. it generates everything for us, right? and I found it is a little strange... in WEB CONSOLE: the auto generated code is " qryEntity.setKeyFields(new JdbcTypeField(Types.BIGINT, "PK", long.class, "pk")); " in DOWNLOADED zip file, code is " type.setKeyFields(new JdbcTypeField(Types.BIGINT, "PK", long.class, "pk")); " the type is "JdbcType"... not the "qryEntity" so is it a minor bug? after that, May I ask one more question the update sql returns no more exception, it is good. But, the data doesn't be udpatedin ignite and Db... do you have any comments? thanks :-) -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/insert-update-delete-issue-in-Version-1-8-tp10244p10260.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
insert/update/delete issue in Version 1.8
dear experts: I got exception - "Caused by: java.lang.IllegalStateException: Ownership flag not set for binary property. Have you set 'keyFields' property of QueryEntity in programmatic or XML configuration? " when my code is following link of "https://apacheignite.readme.io/docs/jdbc-driver;. part of my code like below" ... Class.forName("org.apache.ignite.IgniteJdbcDriver"); this.conn = DriverManager.getConnection("jdbc:ignite:cfg://cache=CartentriesCache@file:///Users/i306576/hybris.xxx/hybris.6200.ignite18/hybris/bin/custom/ucs/resources/ignite-jdbc.xml"); final PreparedStatement stmt =getConn().prepareStatement("update cartentries set p_quantity=21 where pk=8796093054977"); stmt.executeUpdate(); " I feel I followed the instructions... but why not successful? please advise. -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/insert-update-delete-issue-in-Version-1-8-tp10244.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
monitoring issue -Connection to Ignite Node is not established
dear experts: I am using ignite 1.8 with agent 1.7.4 after start the agent with default properties, I can import local db schema things into webconsole. but... the "monitoring clusters" function doesn't work. like below: in command line: [21:50:56,754][INFO ][EventThread][RestHandler] Failed connect to node and execute REST command [uri=http://localhost:8080/ignite?mtr=true=top=true] in browser: Connection to Ignite Node is not established Failed connect to node and execute REST command. I surely enjoyed this monitoring feature in previous version.. but this new 1.8 with 1.7.4 doesn't work. please tell me what changes product team make? thanks~ -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/monitoring-issue-Connection-to-Ignite-Node-is-not-established-tp10216.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: sample code for customised Partition logic
Hi Val, the reason is that "assignPartitions()" returns same "List>" usually even I start two ignite nodes. last Friday, I refactor it as below:[ @Override public List > assignPartitions(final AffinityFunctionContext affCtx) { final List nodes = affCtx.currentTopologySnapshot(); int tmpi = 0; final List > assignments = new ArrayList<>(2); for (int i = 0; i < 2; i++) { final List partAssignment = new ArrayList(); partAssignment.add(nodes.get(tmpi)); if (tmpi < nodes.size() - 1) { tmpi++; } assignments.add(partAssignment); } return assignments; } ] and it return result like: list[0] -> node1; list[1] -> node2. it is what I want. I don't think the original "assignPartitions()" has bug. (there are lots of people use it without error, right?) but why "assignPartitions()" returns to me the same node# List ? -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/sample-code-for-customised-Partition-logic-tp8270p8317.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
sample code for customised Partition logic
Dear All, I can not find sample code for how customise partition... and I could almost finish it by myself. however, the most wired thing is it work occasionally !!?? most of time it doesn't work my code is:[ public class UCSRendezvousAffinityFunction extends RendezvousAffinityFunction { public int partitions() { return 2; //only test 2 partitions :-) } public int partition(final Object key) { ... return xxx % 2; } //this API is...correct?? public List> assignPartitions(final AffinityFunctionContext affCtx) { final List > assignments = new ArrayList<>(partitions()); final boolean exclNeighbors = false; final Map > neighborhoodCache = exclNeighbors ? GridCacheUtils.neighbors(affCtx.currentTopologySnapshot()) : null; for (int i = 0; i < partitions(); i++) { final List partAssignment = assignPartition(i, affCtx.currentTopologySnapshot(), affCtx.backups(), neighborhoodCache); assignments.add(partAssignment); } return assignments; } } ] So as I said... it works from time to timewhy. and could you show me if my API of "assignPartitions()" is right or maybe do me a favour what is your code? thanks a lot. -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/sample-code-for-customised-Partition-logic-tp8270.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
how to verify the cached elements in each of partitions
Hi Experts, i implemented the customised partition thing like below: [ public class MattRendezvousAffinityFunction extends RendezvousAffinityFunction { .. public int partition(final Object key){ . //return 0 or 1 because I launch two nodes } } ] I feel I already touch the most important part.. now I know the default partitions is 1024. after launched two ignite server node jvms, I expected to see items goto each of partitions in nodes but how to check this thing? (I feel all the items goto the first started node) the "cache -scan" can not show things within one partition... right? -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/how-to-verify-the-cached-elements-in-each-of-partitions-tp7085.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
beloved ignite vs. xxx: what is the actual status
Dear Experts, I am testing ignite functions for some weeks. although there are a number of bugs to be fix, I can successfully run it over DB, hiding some table from the cache by sql interaction with ignite. this is really cool. Now May I get some professional performance statistics, for example: read/write performance per second? I know redis can handle over 10k operations per second. besides, how to compare ignite with something like ... Infinispan? that looks cool too.. also support all the functions even Query DSL. please refer to: http://vschart.com/compare/jboss-infinispan/vs/redis-database and this website looks professional.. is there any public comparison for ignite? thanks. -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/beloved-ignite-vs-xxx-what-is-the-actual-status-tp4901.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: trouble about Underscore and Boolean
Hi Alexey, how is this issue going? could you share some updates for me? thanks~ -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/trouble-about-Underscore-and-Boolean-tp4840p4850.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: trouble about Underscore and Boolean
thanks your help. please refer to the following table schema:(you see...tinyint(1) columns are treated as Boolean :-( ) -- MySQL dump 10.13 Distrib 5.6.25, for osx10.8 (x86_64) -- -- Host: localhostDatabase: h5700ignite -- -- -- Server version 5.6.25 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `cartentries` -- DROP TABLE IF EXISTS `cartentries`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `cartentries` ( `hjmpTS` bigint(20) DEFAULT NULL, `createdTS` datetime(6) DEFAULT NULL, `modifiedTS` datetime(6) DEFAULT NULL, `TypePkString` bigint(20) DEFAULT NULL, `OwnerPkString` bigint(20) DEFAULT NULL, `PK` bigint(20) NOT NULL DEFAULT '0', `p_baseprice` decimal(30,8) DEFAULT NULL, `p_calculated` tinyint(1) DEFAULT NULL, `p_discountvaluesinternal` text COLLATE utf8_bin, `p_entrynumber` int(11) DEFAULT NULL, `p_info` varchar(255) COLLATE utf8_bin DEFAULT NULL, `p_product` bigint(20) DEFAULT NULL, `p_quantity` decimal(30,8) DEFAULT NULL, `p_taxvaluesinternal` varchar(255) COLLATE utf8_bin DEFAULT NULL, `p_totalprice` decimal(30,8) DEFAULT NULL, `p_unit` bigint(20) DEFAULT NULL, `p_giveaway` tinyint(1) DEFAULT NULL, `p_rejected` tinyint(1) DEFAULT NULL, `p_order` bigint(20) DEFAULT NULL, `p_chosenvendor` bigint(20) DEFAULT NULL, `p_deliveryaddress` bigint(20) DEFAULT NULL, `p_deliverymode` bigint(20) DEFAULT NULL, `p_nameddeliverydate` datetime(6) DEFAULT NULL, `p_quantitystatus` bigint(20) DEFAULT NULL, `p_deliverypointofservice` bigint(20) DEFAULT NULL, `aCLTS` bigint(20) DEFAULT '0', `propTS` bigint(20) DEFAULT '0', PRIMARY KEY (`PK`), KEY `oeProd_44` (`p_product`), KEY `oeOrd_44` (`p_order`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2016-05-08 0:54:17 -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/trouble-about-Underscore-and-Boolean-tp4840p4842.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
trouble about Underscore and Boolean
dear experts, I meet troubles that very boring : trouble 1: I noticed that ignite generates fields without underscore... i.e. remove it if my table column : p_baseprice -> pBaseprice trouble2: ignite treats int(1) as Boolean how to indicate it as just integer??? please confirm if ignite is doing the above things and how to change them? I actually modified pBaseprice back to p_baseprice manually.(so boring...) but, after I change Boolean to integer. the starting ignite server process throws exception. I am in mess at all. please clarify if manual changes(from Boolean to Integer) work? i am modifying the "ServerConfigurationFactory.java" of course. -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/trouble-about-Underscore-and-Boolean-tp4840.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: How to start and use ignite in Tomcat
Hello experts~~~ my goal is to use ignite(in standalone server style) from tomcat webapp. And I am trying to start ignite client in web app owned logic(programming it, not by ServletContextListenerStartup), does it work? in my project, I want to hide one table (table in mysql DB) by putting ignite layer on above of it. indeed, ignite doesn't support insert/update/delete so far. So I did some coding to translate them to put operations however, the exception is about "class org.apache.ignite.IgniteException: Ignite instance with this name has already been started: b2c_acc"... what is the root cause of it? might it be only one ignite instance there per jvm? and where/who start ignite several times? -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-start-and-use-ignite-in-Tomcat-tp4776p4822.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
How to start and use ignite in Tomcat
Dear all, i searched a number of topics here. but still don't know how to start and use ignite (in client mode) from Tomcat you know, I launched the standalone ignite as server node. my code in tomcat web app like this:" this.ignite = Ignition.start(ClientConfigurationFactory.createConfiguration()); Class.forName("org.apache.ignite.IgniteJdbcDriver"); this.conn = DriverManager .getConnection("jdbc:ignite:cfg://cache=b2c_accCache@file:///Users/i306576/Documents/ignite/apache-ignite-fabric-1.5.0.final-bin/examples/config/ignite-jdbc.xml"); this.cartCacher = new CartCacher(); this.ic = ignite.cache("b2c_accCache"); " the console log show some error mes I don't understand..." Caused by: class org.apache.ignite.IgniteCheckedException: Ignite instance with this name has already been started: b2c_acc " :-( the thing is this kind of client mode is ok without Tomcat... please help~~ -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-start-and-use-ignite-in-Tomcat-tp4776.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: ignite not support expression: EXISTS?
dear experts, still no response for this question. So I guess ignite currently doesn't support the "EXISTS". do we have any plan or jira# to track it so that we could implement it in a later version? thanks ~~ -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/ignite-not-support-expression-EXISTS-tp3711p3755.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: ignite not support expression: EXISTS?
I would like to append more details now I realised there are two ways to query cache data: 1. by SqlFieldsQuery related approach 2. by "org.apache.ignite.IgniteJdbcDriver", which could give us standard ResultSet, it is really cool. so that we could treat ignite as a real in-memory DB, please correct me... BUT, why not support "EXISTS" clause... ;-(..?? -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/ignite-not-support-expression-EXISTS-tp3711p3730.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
ignite not support expression: EXISTS?
dear experts, I knew ignite supports ANSI 99 SQL. but seemed not support expression: EXISTS... really? Our company sw uses this keyword lots of times. My testing sql is:" select * from products as a where exists(select * from productslp as b where a.pk=b.itempk and a.pcode='100124'); " and ignite throw exception like below: Caused by: class org.apache.ignite.IgniteException: Unsupported expression: EXISTS( SELECT B._KEY, B._VAL, B.ITEMPK, B.ITEMTYPEPK, B.LANGPK, B.PNAME, B.PDESCRIPTION, B.PMANUFACTURERTYPEDESCRIPTION, B.PSEGMENT, B.PARTICLESTATUS, B.PSUMMARY, B.PSTYLE, B.PSIZE, B.PCOLOR FROM "b2c_accCache".PRODUCTSLP B /* "b2c_accCache"."PRIMARY": ITEMPK = A.PK */ WHERE (A.PCODE = '100124') AND (A.PK = B.ITEMPK)) [type=ConditionExists] at org.apache.ignite.internal.processors.query.GridQueryProcessor.queryTwoStep(GridQueryProcessor.java:806) at org.apache.ignite.internal.processors.cache.IgniteCacheProxy.query(IgniteCacheProxy.java:647) ... 1 more Caused by: class org.apache.ignite.IgniteCheckedException: Unsupported expression: EXISTS( SELECT B._KEY, B._VAL, B.ITEMPK, B.ITEMTYPEPK, B.LANGPK, B.PNAME, B.PDESCRIPTION, B.PMANUFACTURERTYPEDESCRIPTION, B.PSEGMENT, B.PARTICLESTATUS, B.PSUMMARY, B.PSTYLE, B.PSIZE, B.PCOLOR FROM "b2c_accCache".PRODUCTSLP B /* "b2c_accCache"."PRIMARY": ITEMPK = A.PK */ WHERE (A.PCODE = '100124') AND (A.PK = B.ITEMPK)) [type=ConditionExists] at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:1782) at org.apache.ignite.internal.processors.query.GridQueryProcessor.queryTwoStep(GridQueryProcessor.java:799) ... 2 more Caused by: class org.apache.ignite.IgniteException: Unsupported expression: EXISTS( SELECT B._KEY, B._VAL, B.ITEMPK, B.ITEMTYPEPK, B.LANGPK, B.PNAME, B.PDESCRIPTION, B.PMANUFACTURERTYPEDESCRIPTION, B.PSEGMENT, B.PARTICLESTATUS, B.PSUMMARY, B.PSTYLE, B.PSIZE, B.PCOLOR FROM "b2c_accCache".PRODUCTSLP B /* "b2c_accCache"."PRIMARY": ITEMPK = A.PK */ WHERE (A.PCODE = '100124') AND (A.PK = B.ITEMPK)) [type=ConditionExists] at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser.parseExpression0(GridSqlQueryParser.java:648) at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser.parseExpression(GridSqlQueryParser.java:421) at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser.parse(GridSqlQueryParser.java:301) at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser.parse(GridSqlQueryParser.java:372) at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser.parse(GridSqlQueryParser.java:244) at org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.split(GridSqlQuerySplitter.java:153) at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryTwoStep(IgniteH2Indexing.java:1055) at org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:801) at org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:799) at org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36) at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:1764) ... 3 more -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/ignite-not-support-expression-EXISTS-tp3711.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
question about how to monitor ignite
I am using ignite to "select" lots of DB records into cache. after that, I want to follow the "To start Console Management & Monitoring run ignitevisorcmd.{sh|bat}". however, not get correct idea how to use it. the reason is that I ran ignite test from eclipse... and not xml Configuration File. so what should I do: [ visor> open Local configuration files: ++ | # |Configuration File | ++ | 0 | config/default-config.xml | | 1 | (?) config/router/default-router.xml | | 2 | examples/config/example-cache.xml | | 3 | examples/config/example-default.xml | ++ Choose configuration file number ('c' to cancel) [0]: c ] besides, not sure if GridGain provide web style monitoring tool like web console? thanks~ -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/question-about-how-to-monitor-ignite-tp3599.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: org.apache.ignite.IgniteCheckedException: Failed to register query type: TypeDescriptor
super cool So before ver1.6, let me test more things about "SELECT". -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/org-apache-ignite-IgniteCheckedException-Failed-to-register-query-type-TypeDescriptor-tp3447p3579.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.