@Override public String getDriverName() throws SQLException { return connection.getClientInfo(PhoenixEmbeddedDriver.DRIVER_NAME_PROP); }
@Override public String getDriverVersion() throws SQLException { return connection.getClientInfo(PhoenixEmbeddedDriver.MAJOR_VERSION_PROP) + "." + connection.getClientInfo(PhoenixEmbeddedDriver.MINOR_VERSION_PROP); }
@Override public int getDriverMajorVersion() { return Integer.parseInt(connection.getClientInfo(PhoenixEmbeddedDriver.MAJOR_VERSION_PROP)); }
@Override public int getDriverMinorVersion() { return Integer.parseInt(connection.getClientInfo(PhoenixEmbeddedDriver.MINOR_VERSION_PROP)); }
public PhoenixConnection(PhoenixConnection connection, long scn) throws SQLException { this(connection, newPropsWithSCN(scn, connection.getClientInfo())); }
public PhoenixConnection(PhoenixConnection connection, boolean isDescRowKeyOrderUpgrade, boolean isRunningUpgrade) throws SQLException { this(connection.getQueryServices(), connection.getURL(), connection .getClientInfo(), connection.metaData, connection .getMutationState(), isDescRowKeyOrderUpgrade, isRunningUpgrade, connection.buildingIndex); this.isAutoCommit = connection.isAutoCommit; this.isAutoFlush = connection.isAutoFlush; this.sampler = connection.sampler; this.statementExecutionCounter = connection.statementExecutionCounter; }
private PhoenixConnection removeNotNullConstraint(PhoenixConnection oldMetaConnection, String schemaName, String tableName, long timestamp, String columnName) throws SQLException { Properties props = PropertiesUtil.deepCopy(oldMetaConnection.getClientInfo()); props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(timestamp));
Properties props = PropertiesUtil.deepCopy(oldMetaConnection.getClientInfo()); props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(timestamp));
String prevTenantId = null; PhoenixConnection metaConn = queryConn; Properties props = new Properties(queryConn.getClientInfo()); props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(HConstants.LATEST_TIMESTAMP)); while (rs.next()) {
public PhoenixConnection(PhoenixConnection connection, MutationState mutationState) throws SQLException { this(connection.getQueryServices(), connection.getURL(), connection .getClientInfo(), connection.getMetaDataCache(), mutationState, connection.isDescVarLengthRowKeyUpgrade(), connection .isRunningUpgrade(), connection.buildingIndex); }
Properties props = new Properties(globalConn.getClientInfo()); props.setProperty(PhoenixRuntime.TENANT_ID_ATTRIB, tenantId); conn = DriverManager.getConnection(url, props);
private PhoenixConnection dropStatsTable(PhoenixConnection oldMetaConnection, long timestamp) throws SQLException, IOException { Properties props = PropertiesUtil.deepCopy(oldMetaConnection.getClientInfo()); props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(timestamp)); PhoenixConnection metaConnection = new PhoenixConnection(oldMetaConnection, this, props);
Properties props = PropertiesUtil.deepCopy(oldMetaConnection.getClientInfo()); props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(timestamp)); PhoenixConnection metaConnection = new PhoenixConnection(oldMetaConnection, this, props);
private PhoenixConnection addColumnQualifierColumn(PhoenixConnection oldMetaConnection, Long timestamp) throws SQLException { Properties props = PropertiesUtil.deepCopy(oldMetaConnection.getClientInfo()); props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(timestamp));
UpgradeUtil.upgradeTable(conn, srcTable); } else if (execCmd.isUpgrade()) { if (conn.getClientInfo(PhoenixRuntime.CURRENT_SCN_ATTRIB) != null) { throw new SQLException( "May not specify the CURRENT_SCN property when upgrading"); } if (conn.getClientInfo(PhoenixRuntime.TENANT_ID_ATTRIB) != null) { throw new SQLException( "May not specify the TENANT_ID_ATTRIB property when upgrading"); } if (execCmd.getInputFiles().isEmpty()) {
Properties props = PropertiesUtil.deepCopy(oldMetaConnection.getClientInfo()); props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(timestamp)); PhoenixConnection metaConnection = new PhoenixConnection(oldMetaConnection, this, props);
private MutationState buildIndexAtTimeStamp(PTable index, NamedTableNode dataTableNode) throws SQLException { Properties props = new Properties(connection.getClientInfo()); props.setProperty(PhoenixRuntime.BUILD_INDEX_AT_ATTRIB, Long.toString(connection.getSCN()+1)); PhoenixConnection conn = new PhoenixConnection(connection, connection.getQueryServices(), props);
public static PhoenixConnection upgradeLocalIndexes(PhoenixConnection metaConnection) throws SQLException, IOException, org.apache.hadoop.hbase.TableNotFoundException { Properties props = PropertiesUtil.deepCopy(metaConnection.getClientInfo()); Long originalScn = null; String str = props.getProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB);
public static PhoenixConnection disableViewIndexes(PhoenixConnection connParam) throws SQLException, IOException, InterruptedException, TimeoutException { Properties props = PropertiesUtil.deepCopy(connParam.getClientInfo()); Long originalScn = null; String str = props.getProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB); Properties newProps = PropertiesUtil.deepCopy(globalConnection.getClientInfo()); newProps.setProperty(PhoenixRuntime.TENANT_ID_ATTRIB, tenantId); PTable indexPTable = null;
mapChildViewsToNamespace(conn.getURL(), conn.getClientInfo(), childViewsResult.getLinks());