private EmbedPreparedStatement getStatement() throws SQLException { Properties props = new Properties(); props.setProperty(Attribute.QUERY_HDFS, Boolean.toString(getQueryHDFS())); this.wrapper = GfxdConnectionHolder.getOrCreateWrapper(this.defaultSchema, this.connectionId, false, props); final EmbedConnection conn = this.wrapper.getConnectionForSynchronization(); synchronized (conn.getConnectionSynchronization()) { conn.setDefaultSchema(this.defaultSchema); this.wrapper.convertToHardReference(conn); conn.getLanguageConnection().setStatsEnabled(statsEnabled(), timeStatsEnabled(), explainConnectionEnabled()); conn.getLanguageConnection().setQueryHDFS(getQueryHDFS()); if (this.getNCJMetaDataOnRemote() != null) { conn.getLanguageConnection().setNcjBatchSize( NcjHashMapWrapper.getBatchSize(this.getNCJMetaDataOnRemote())); conn.getLanguageConnection().setNcjCacheSize( NcjHashMapWrapper.getCacheSize(this.getNCJMetaDataOnRemote())); } this.wrapperForMarkUnused = this.wrapper; return (EmbedPreparedStatement)this.wrapper.getStatement(this.source, this.statementId, true /* is prep stmnt */, needGfxdSubActivation(), allowSubqueryFlattening(), allTablesAreReplicatedOnRemote(), this.getNCJMetaDataOnRemote(), false, this.rootId, this.statementLevel); } }
private EmbedPreparedStatement getStatement() throws SQLException { Properties props = new Properties(); props.setProperty(Attribute.QUERY_HDFS, Boolean.toString(getQueryHDFS())); this.wrapper = GfxdConnectionHolder.getOrCreateWrapper(this.defaultSchema, this.connectionId, false, props); final EmbedConnection conn = this.wrapper.getConnectionForSynchronization(); synchronized (conn.getConnectionSynchronization()) { conn.setDefaultSchema(this.defaultSchema); this.wrapper.convertToHardReference(conn); conn.getLanguageConnection().setStatsEnabled(statsEnabled(), timeStatsEnabled(), explainConnectionEnabled()); conn.getLanguageConnection().setQueryHDFS(getQueryHDFS()); if (this.getNCJMetaDataOnRemote() != null) { conn.getLanguageConnection().setNcjBatchSize( NcjHashMapWrapper.getBatchSize(this.getNCJMetaDataOnRemote())); conn.getLanguageConnection().setNcjCacheSize( NcjHashMapWrapper.getCacheSize(this.getNCJMetaDataOnRemote())); } this.wrapperForMarkUnused = this.wrapper; return (EmbedPreparedStatement)this.wrapper.getStatement(this.source, this.statementId, true /* is prep stmnt */, needGfxdSubActivation(), allowSubqueryFlattening(), allTablesAreReplicatedOnRemote(), this.getNCJMetaDataOnRemote(), false, this.rootId, this.statementLevel); } }
private EmbedPreparedStatement getStatement() throws SQLException { Properties props = new Properties(); props.setProperty(Attribute.QUERY_HDFS, Boolean.toString(getQueryHDFS())); this.wrapper = GfxdConnectionHolder.getOrCreateWrapper(this.defaultSchema, this.connectionId, false, props); final EmbedConnection conn = this.wrapper.getConnectionForSynchronization(); synchronized (conn.getConnectionSynchronization()) { conn.setDefaultSchema(this.defaultSchema); this.wrapper.convertToHardReference(conn); conn.getLanguageConnection().setStatsEnabled(statsEnabled(), timeStatsEnabled(), explainConnectionEnabled()); conn.getLanguageConnection().setQueryHDFS(getQueryHDFS()); if (this.getNCJMetaDataOnRemote() != null) { conn.getLanguageConnection().setNcjBatchSize( NcjHashMapWrapper.getBatchSize(this.getNCJMetaDataOnRemote())); conn.getLanguageConnection().setNcjCacheSize( NcjHashMapWrapper.getCacheSize(this.getNCJMetaDataOnRemote())); } this.wrapperForMarkUnused = this.wrapper; return (EmbedPreparedStatement)this.wrapper.getStatement(this.source, this.statementId, true /* is prep stmnt */, needGfxdSubActivation(), allowSubqueryFlattening(), allTablesAreReplicatedOnRemote(), this.getNCJMetaDataOnRemote(), false, this.rootId, this.statementLevel); } }