Skip to content

Conversation

@Divneet18
Copy link
Contributor

No description provided.

@virajjasani
Copy link
Contributor

There are some merge conflicts

if (!clusterInitialized) {
throw new IllegalStateException("Cluster must be initialized before attempting to get the URL");
}
if(Boolean.parseBoolean(System.getProperty("phoenix.ha.profile.active"))){
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to constant in HAGroup

url = haGroup.getRoleRecord().getActiveUrl();
if (url.isPresent()) {
return url.get() + ";" + PHOENIX_TEST_DRIVER_URL_PARAM;
} else {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove else block

Copy link
Contributor

@lokiore lokiore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took initial look, some comments and questions

one suggestion, if we have failing tests which can't be run in HA Mode, maybe exclude them in pom for HA test profile so that for default they run as it is

Comment on lines 698 to 795
public ConnectionQueryServices getQueryServices() throws SQLException {
throw new UnsupportedOperationException();
}

@Override
public PTable getTable(PTableKey key) throws SQLException {
throw new UnsupportedOperationException();
}

@Override
public PTable getTable(String name) throws SQLException {
throw new UnsupportedOperationException();
}

@Override
public PTable getTableNoCache(String name) throws SQLException {
throw new UnsupportedOperationException();
}

@Override
public Consistency getConsistency() throws SQLException {
throw new UnsupportedOperationException();
}

@Override
@Nullable
public PName getTenantId() throws SQLException {
throw new UnsupportedOperationException();
}

@Override
public MutationState getMutationState() throws SQLException {
throw new UnsupportedOperationException();
}

@Override
public PMetaData getMetaDataCache() throws SQLException {
throw new UnsupportedOperationException();
}

@Override
public int getMutateBatchSize() throws SQLException {
throw new UnsupportedOperationException();
}

@Override
public int executeStatements(Reader reader, List<Object> binds, PrintStream out) throws IOException, SQLException {
throw new UnsupportedOperationException();
}

@Override
public Format getFormatter(PDataType type) throws SQLException {
throw new UnsupportedOperationException();
}

@Override
public void setRunningUpgrade(boolean isRunningUpgrade) throws SQLException {
throw new UnsupportedOperationException();
}

@Override
public PTable getTable(String tenantId, String fullTableName) throws SQLException {
throw new UnsupportedOperationException();
}

@Override
public PTable getTableNoCache(PName tenantId, String name) throws SQLException {
throw new UnsupportedOperationException();
}

@Override
public void setIsClosing(boolean imitateIsClosing) throws SQLException {
throw new UnsupportedOperationException();
}

@Override
public String getDatePattern() throws SQLException {
throw new UnsupportedOperationException();
}

@Override
public PTable getTable(@Nullable String tenantId, String fullTableName, @Nullable Long timestamp) throws SQLException {
throw new UnsupportedOperationException();
}

@Override
public boolean isRunningUpgrade() throws SQLException {
throw new UnsupportedOperationException();
}

@Override
public String getURL() throws SQLException {
throw new UnsupportedOperationException();
}

@Override
public LogLevel getLogLevel() throws SQLException {
throw new UnsupportedOperationException();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use runOnConnections() for these methods, we are not using parallel policy for tests but if we want to then it will be helpful?

import org.junit.Test;
import org.junit.experimental.categories.Category;

//Passing with HA Connection
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If all the tests in PR here are passing then we can start removing these comments

props.put(QueryServices.PHOENIX_POST_VALID_PROCESS,
TestScanningResultPostValidResultCaller.class.getName());
setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
if(Boolean.parseBoolean(System.getProperty("phoenix.ha.profile.active"))){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make phoenix.ha.profile.active a constant.

import org.apache.phoenix.thirdparty.com.google.common.base.Function;
import org.apache.phoenix.thirdparty.com.google.common.collect.Lists;

//Failing with HA Connection
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this test still failing?

Comment on lines 1194 to 1196

} else if(e instanceof TableNotFoundException) {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these exceptions are expected, then please add a comment that this is expected.

import org.apache.phoenix.util.SchemaUtil;
import org.apache.phoenix.util.StringUtil;
import org.apache.phoenix.util.TestUtil;
import org.apache.phoenix.util.*;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't use * imports

conf = HBaseConfiguration.create();
hbaseTestUtil = new HBaseTestingUtility(conf);
setUpConfigForMiniCluster(conf);
conf.set(QueryServices.EXTRA_JDBC_ARGUMENTS_ATTRIB, QueryServicesOptions.DEFAULT_EXTRA_JDBC_ARGUMENTS);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we not passing this prop in conf for HA mode?

* Disabling this test as this works on TTL being set on View which is removed and will be added in future.
* TODO:- To enable this test after re-enabling TTL for view for more info check :- PHOENIX-6978
*/
//Failing with HA Connection
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is not being run, no change needed here

public void testPreMatureScannerAbortForCount() throws Exception {

try (Connection conn = DriverManager.getConnection(getUniqueUrl())) {
System.out.println("get url pls check all" + url);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean up required here.

}

@Test
// @Test - ignoring local index test for HA Connection
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here don't ignore for default mode

@Divneet18 Divneet18 requested a review from lokiore October 10, 2025 17:40
@virajjasani
Copy link
Contributor

Does the feature branch have spotless format? i.e. is it upto date with master branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants