Package org.apache.cassandra.stress.util

Examples of org.apache.cassandra.stress.util.JavaDriverClient.prepare()


                        ThriftClient tclient = settings.getThriftClient();
                        Map<String, PreparedStatement> stmts = new HashMap<>();
                        Map<String, Integer> tids = new HashMap<>();
                        for (Map.Entry<String, String> e : queries.entrySet())
                        {
                            stmts.put(e.getKey().toLowerCase(), jclient.prepare(e.getValue()));
                            tids.put(e.getKey().toLowerCase(), tclient.prepare_cql3_query(e.getValue(), Compression.NONE));
                        }
                        thriftQueryIds = tids;
                        queryStatements = stmts;
                    }
View Full Code Here


                    }
                    catch (TException e)
                    {
                        throw new RuntimeException(e);
                    }
                    insertStatement = client.prepare(query);
                }
            }
        }

        return new SchemaInsert(timer, generator, settings, partitions.get(), pervisit.get(), perbatch.get(), thriftInsertId, insertStatement, ThriftConversion.fromThrift(settings.command.consistencyLevel), batchType);
View Full Code Here

                        Map<String, PreparedStatement> stmts = new HashMap<>();
                        Map<String, Integer> tids = new HashMap<>();
                        Map<String, SchemaQuery.ArgSelect> args = new HashMap<>();
                        for (Map.Entry<String, StressYaml.QueryDef> e : queries.entrySet())
                        {
                            stmts.put(e.getKey().toLowerCase(), jclient.prepare(e.getValue().cql));
                            tids.put(e.getKey().toLowerCase(), tclient.prepare_cql3_query(e.getValue().cql, Compression.NONE));
                            args.put(e.getKey().toLowerCase(), e.getValue().fields == null
                                                                     ? SchemaQuery.ArgSelect.MULTIROW
                                                                     : SchemaQuery.ArgSelect.valueOf(e.getValue().fields.toUpperCase()));
                        }
View Full Code Here

                    }
                    catch (TException e)
                    {
                        throw new RuntimeException(e);
                    }
                    insertStatement = client.prepare(query);
                }
            }
        }

        return new SchemaInsert(timer, generator, settings, partitions.get(), selectchance.get(), thriftInsertId, insertStatement, ThriftConversion.fromThrift(settings.command.consistencyLevel), batchType);
View Full Code Here

                        ThriftClient tclient = settings.getThriftClient();
                        Map<String, PreparedStatement> stmts = new HashMap<>();
                        Map<String, Integer> tids = new HashMap<>();
                        for (Map.Entry<String, String> e : queries.entrySet())
                        {
                            stmts.put(e.getKey().toLowerCase(), jclient.prepare(e.getValue()));
                            tids.put(e.getKey().toLowerCase(), tclient.prepare_cql3_query(e.getValue(), Compression.NONE));
                        }
                        thriftQueryIds = tids;
                        queryStatements = stmts;
                    }
View Full Code Here

                    }
                    catch (TException e)
                    {
                        throw new RuntimeException(e);
                    }
                    insertStatement = client.prepare(query);
                }
            }
        }

        return new SchemaInsert(timer, generator, settings, partitions.get(), pervisit.get(), perbatch.get(), thriftInsertId, insertStatement, ThriftConversion.fromThrift(settings.command.consistencyLevel), batchType);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.