@Override public Session init() { return session.init(); }
/** {@inheritDoc} */ @Override public Session init() { return mProxy.init(); }
@Override public RxSession init() { session.init(); return this; }
@Override public RxSession init() { session.init(); return this; }
/** * {@inheritDoc} */ @Override public Session init() { return getSession().init(); }
/** * {@inheritDoc} */ @Override public Session init() { return new TracingSession(session.init(), tracer, querySpanNameProvider, executorService); }
/** * {@inheritDoc} */ @Override public Session init() { return getSession().init(); }
@Override public Session init() { return session.init(); }
/** * Creates a new session on this cluster and initialize it. * <p> * Note that this method will initialize the newly created session, trying * to connect to the Cassandra nodes before returning. If you only want to * create a Session object without initializing it right away, see * {@link #newSession}. * * @return a new session on this cluster sets to no keyspace. * * @throws NoHostAvailableException if the Cluster has not been initialized * yet ({@link #init} has not be called and this is the first connect call) * and no host amongst the contact points can be reached. * @throws AuthenticationException if an authentication error occurs while * contacting the initial contact points. * @throws IllegalStateException if the Cluster was closed prior to calling * this method. This can occur either directly (through {@link #close()} or * {@link #closeAsync()}), or as a result of an error while initializing the * Cluster. */ public Session connect() { init(); Session session = manager.newSession(); session.init(); return session; }
/** * Cassandra record writer constructor. * * @param writeConfig write configuration * @param queryBuilder query builder */ public DeepCqlRecordWriter(ICassandraDeepJobConfig writeConfig, CassandraUpdateQueryBuilder queryBuilder) { this.taskExecutorService = MoreExecutors.listeningDecorator(Utils.newBlockingFixedThreadPoolExecutor (MAX_PARALLEL_QUERIES, WORK_QUEUE_SIZE)); this.pendingTasks = new ConcurrentHashMap<>(); this.writeConfig = writeConfig; this.queryBuilder = queryBuilder; try { InetAddress localhost = InetAddress.getLocalHost(); sessionWithHost = CassandraClientProvider.trySessionForLocation(localhost.getHostAddress(), (CassandraDeepJobConfig) writeConfig, false).left; sessionWithHost.init(); } catch (UnknownHostException e) { throw new DeepInstantiationException("Cannot resolve local hostname", e); } }
private static ProtocolVersion getProtocolVersion(Session session) { session.init(); return session.getCluster().getConfiguration().getProtocolOptions().getProtocolVersion(); }
session.init(); if( createIfMissing )