Skip to content

Commit

Permalink
0005202: Added docs for Manage Incoming Loads screen and added method…
Browse files Browse the repository at this point in the history
…s to DataService
  • Loading branch information
evan-miller-jumpmind committed Jan 24, 2022
1 parent 21b3654 commit f59bb8d
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 7 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion symmetric-assemble/src/asciidoc/manage.ad
Expand Up @@ -183,13 +183,22 @@ include::manage/installed-triggers.ad[]
ifdef::pro[]
=== Outgoing Loads

The Outgoing Loads screen shows the number of loads that have been queued. It also lists loads that have had <<Outgoing Batches>> created. The screens shows
The Outgoing Loads screen shows the number of outgoing loads that have been queued. It also lists loads that have had <<Outgoing Batches>> created. The screen shows
loads that are sourced from the current node.

You can cancel a load that is in progress by selecting the load and pressing the _Cancel_ button.

image::manage/manage-outgoing-loads.png[]

=== Incoming Loads

The Incoming Loads screen shows the number of incoming loads that have been queued. It also lists loads that have had <<Incoming Batches>> created. The screen shows
loads that are targeted at the current node.

You can cancel a load that is in progress by selecting the load and pressing the _Cancel_ button.

image::manage/manage-incoming-loads.png[]

endif::pro[]

=== Outgoing Batches
Expand Down
Expand Up @@ -61,11 +61,21 @@ public interface IDataService {
public TableReloadRequest getTableReloadRequest(long loadId, String triggerId, String routerId);

public List<TableReloadRequest> getTableReloadRequestToProcess(final String sourceNodeId);

public List<TableReloadRequest> getTableReloadRequestToProcessByTarget(final String targetNodeId);

public List<TableReloadStatus> getTableReloadStatus();

public List<TableReloadStatus> getOutgoingTableReloadStatus();

public List<TableReloadStatus> getIncomingTableReloadStatus();

public List<TableReloadStatus> getActiveTableReloadStatus();

public List<TableReloadStatus> getActiveOutgoingTableReloadStatus();

public List<TableReloadStatus> getActiveIncomingTableReloadStatus();

public TableReloadStatus getTableReloadStatusByLoadId(long loadId);

public List<TableReloadStatus> getTableReloadStatusByTarget(String targetNodeId);
Expand Down
Expand Up @@ -328,22 +328,66 @@ public TableReloadRequest mapRow(Row rs) {
}
}, sourceNodeId);
}

public List<TableReloadRequest> getTableReloadRequestToProcessByTarget(final String targetNodeId) {
return sqlTemplate.query(getSql("selectTableReloadRequestToProcessByTarget"),
new ISqlRowMapper<TableReloadRequest>() {
public TableReloadRequest mapRow(Row rs) {
TableReloadRequest request = new TableReloadRequest();
request.setSourceNodeId(rs.getString("source_node_id"));
request.setTargetNodeId(targetNodeId);
request.setCreateTable(rs.getBoolean("create_table"));
request.setDeleteFirst(rs.getBoolean("delete_first"));
request.setReloadSelect(rs.getString("reload_select"));
request.setReloadTime(rs.getDateTime("reload_time"));
request.setBeforeCustomSql(rs.getString("before_custom_sql"));
request.setChannelId(rs.getString("channel_id"));
request.setTriggerId(rs.getString("trigger_id"));
request.setRouterId(rs.getString("router_id"));
request.setLoadId(rs.getLong("load_id"));
request.setCreateTime(rs.getDateTime("create_time"));
request.setLastUpdateBy(rs.getString("last_update_by"));
request.setLastUpdateTime(rs.getDateTime("last_update_time"));
return request;
}
}, targetNodeId);
}

public List<TableReloadRequest> getTableReloadRequests() {
return sqlTemplateDirty.query(getSql("selectTableReloadRequests"),
new TableReloadRequestMapper());
}

public List<TableReloadStatus> getTableReloadStatus() {
return sqlTemplateDirty.query(getSql("selectTableReloadStatus"),
return sqlTemplateDirty.query(getSql("selectTableReloadStatus", "orderTableReloadStatus"),
new TableReloadStatusMapper());
}

public List<TableReloadStatus> getOutgoingTableReloadStatus() {
return sqlTemplateDirty.query(getSql("selectTableReloadStatus", "whereSourceNodeId", "orderTableReloadStatus"),
new TableReloadStatusMapper(), engine.getNodeId());
}

public List<TableReloadStatus> getIncomingTableReloadStatus() {
return sqlTemplateDirty.query(getSql("selectTableReloadStatus", "whereTargetNodeId", "orderTableReloadStatus"),
new TableReloadStatusMapper(), engine.getNodeId());
}

public List<TableReloadStatus> getActiveTableReloadStatus() {
return sqlTemplateDirty.query(getSql("selectActiveTableReloadStatus"),
return sqlTemplateDirty.query(getSql("selectActiveTableReloadStatus", "orderTableReloadStatus"),
new TableReloadStatusMapper());
}

public List<TableReloadStatus> getActiveOutgoingTableReloadStatus() {
return sqlTemplateDirty.query(getSql("selectActiveTableReloadStatus", "andSourceNodeId", "orderTableReloadStatus"),
new TableReloadStatusMapper(), engine.getNodeId());
}

public List<TableReloadStatus> getActiveIncomingTableReloadStatus() {
return sqlTemplateDirty.query(getSql("selectActiveTableReloadStatus", "andTargetNodeId", "orderTableReloadStatus"),
new TableReloadStatusMapper(), engine.getNodeId());
}

public TableReloadStatus getTableReloadStatusByLoadId(long loadId) {
return sqlTemplateDirty.queryForObject(getSql("selectTableReloadStatusByLoadId"),
new TableReloadStatusMapper(), loadId);
Expand Down
Expand Up @@ -40,6 +40,12 @@ public DataServiceSqlMap(IDatabasePlatform platform, Map<String, String> replace
+ " from $(table_reload_request) "
+ " where source_node_id=? and processed = 0 "
+ " order by create_time, target_node_id");
putSql("selectTableReloadRequestToProcessByTarget", "select source_node_id, create_table, delete_first, reload_select, before_custom_sql, "
+ " reload_time, channel_id, create_time, last_update_by, "
+ " last_update_time, trigger_id, router_id, load_id "
+ " from $(table_reload_request) "
+ " where target_node_id=? and processed = 0 "
+ " order by create_time, source_node_id");
putSql("selectTableReloadRequests", "select source_node_id, target_node_id, load_id, "
+ " trigger_id, router_id, create_time, create_table, delete_first, reload_select, "
+ " before_custom_sql, reload_time, processed, channel_id, last_update_by, last_update_time "
Expand Down Expand Up @@ -69,8 +75,7 @@ public DataServiceSqlMap(IDatabasePlatform platform, Map<String, String> replace
+ " completed, cancelled, full_load, "
+ " start_time, end_time, last_update_time, last_update_by, "
+ " error_flag, sql_state, sql_code, sql_message "
+ " from $(table_reload_status) "
+ " order by load_id desc, completed, last_update_time desc");
+ " from $(table_reload_status) ");
putSql("selectActiveTableReloadStatus", "select source_node_id, target_node_id, load_id, "
+ " end_data_batch_id, start_data_batch_id, "
+ " setup_batch_count, data_batch_count, finalize_batch_count, "
Expand All @@ -80,8 +85,12 @@ public DataServiceSqlMap(IDatabasePlatform platform, Map<String, String> replace
+ " start_time, end_time, last_update_time, last_update_by, "
+ " error_flag, sql_state, sql_code, sql_message "
+ " from $(table_reload_status) "
+ " where completed = 0 and cancelled = 0"
+ " order by load_id desc, completed, last_update_time desc");
+ " where completed = 0 and cancelled = 0");
putSql("orderTableReloadStatus", " order by load_id desc, completed, last_update_time desc");
putSql("whereSourceNodeId", " where source_node_id = ?");
putSql("whereTargetNodeId", " where target_node_id = ?");
putSql("andSourceNodeId", " and source_node_id = ?");
putSql("andTargetNodeId", " and target_node_id = ?");
putSql("selectTableReloadStatusByLoadId", "select source_node_id, target_node_id, load_id, "
+ " end_data_batch_id, start_data_batch_id, "
+ " setup_batch_count, data_batch_count, finalize_batch_count, "
Expand Down

0 comments on commit f59bb8d

Please sign in to comment.