[
https://issues.apache.org/jira/browse/PHOENIX-6429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17312669#comment-17312669
]
ASF GitHub Bot commented on PHOENIX-6429:
-----------------------------------------
jpisaac commented on a change in pull request #1185:
URL: https://github.com/apache/phoenix/pull/1185#discussion_r605165727
##########
File path:
phoenix-pherf/src/main/java/org/apache/phoenix/pherf/workload/mt/tenantoperation/PreScenarioOperationSupplier.java
##########
@@ -55,24 +56,27 @@ public OperationStats apply(final TenantOperationInfo
input) {
final String opGroup = input.getOperationGroupId();
final String tableName = input.getTableName();
final String scenarioName = input.getScenarioName();
+ final boolean isTenantGroupGlobal =
(tenantGroup.compareTo(TenantGroup.DEFAULT_GLOBAL_ID) == 0);
long startTime = EnvironmentEdgeManager.currentTimeMillis();
int status = 0;
if (!operation.getPreScenarioDdls().isEmpty()) {
for (Ddl ddl : operation.getPreScenarioDdls()) {
- final String tenantId = ddl.isUseGlobalConnection() ?
null : input.getTenantId();
+ // TODO:
+ // Ideally the fact that the op needs to executed
using global connection
+ // needs to be built into the framework and injected
during event generation.
+ // For now a special tenant whose id =
"TGLOBAL00000001" will be logged.
+ final String tenantId = isTenantGroupGlobal ||
ddl.isUseGlobalConnection() ? null : input.getTenantId();
final String opName = String.format("%s:%s:%s:%s:%s",
scenarioName, tableName, opGroup, tenantGroup,
input.getTenantId());
try (Connection conn =
phoenixUtil.getConnection(tenantId)) {
LOGGER.info("\nExecuting DDL:" + ddl + ",
OPERATION:" + opName);
- phoenixUtil.executeStatement(ddl.toString(), conn);
+ String sql = ddl.toString();
+ phoenixUtil.executeStatement(sql, conn);
if
(ddl.getStatement().toUpperCase().contains(phoenixUtil.ASYNC_KEYWORD)) {
phoenixUtil.waitForAsyncIndexToFinish(ddl.getTableName());
}
- } catch (SQLException sqle) {
- LOGGER.error("Operation " + opName + " failed with
exception ", sqle);
- status = -1;
Review comment:
@ChinmaySKulkarni
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Add support for global connections and sequential data generators
> -----------------------------------------------------------------
>
> Key: PHOENIX-6429
> URL: https://issues.apache.org/jira/browse/PHOENIX-6429
> Project: Phoenix
> Issue Type: Sub-task
> Reporter: Jacob Isaac
> Priority: Major
>
> We may at times want to upsert or query using global connections.
> Also add additional sequential data generators in addition to INTEGER and
> VARCHAR data types.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)