Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Issue1838 #1842

Merged
merged 19 commits into from
Jul 18, 2018
Merged

Issue1838 #1842

merged 19 commits into from
Jul 18, 2018

Conversation

rum2mojito
Copy link
Collaborator

No description provided.

@@ -246,12 +246,12 @@ private void checkActionNames(
* @throws IOException
*/
private void checkActionsOnSubmit(CmdletInfo cmdletInfo,
List<ActionInfo> actionInfos) throws IOException {
List<ActionInfo> actionInfos) throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

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

Code alignment

@@ -565,7 +564,7 @@ private ScheduleResult scheduleCmdletActions(CmdletInfo info, LaunchCmdlet launc
}

private void postscheduleCmdletActions(List<Long> actions, ScheduleResult result,
int lastAction, int lastScheduler) {
int lastAction, int lastScheduler) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Code alignment for functions followed

public ActionGroup searchAction(String path, long pageIndex, long numPerPage,
List<String> orderBy, List<Boolean> isDesc) throws IOException {
try {
LOG.info("[metaStore search] " + path);
Copy link
Contributor

Choose a reason for hiding this comment

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

Use debug level instead

List<ActionInfo> infos = metaStore.searchAction(path, (pageIndex - 1) * numPerPage,
numPerPage, orderBy, isDesc);
for (ActionInfo info : infos) {
LOG.info("[metaStore search] " + info.getActionName());
Copy link
Contributor

Choose a reason for hiding this comment

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

Use debug level instead

}


public List<ActionInfo> searchAction(String path, long start, long offset) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Merge with the upper function,

List<Boolean> desc) throws MetaStoreException {
try {
if (orderBy.size() == 0) {
return actionDao.searchAction(path, start, offset);
Copy link
Contributor

Choose a reason for hiding this comment

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

Call one function instead of two. The arguments can be handled in the function internally.

JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
boolean ifHasAid = false;
String sql = "SELECT * FROM " + TABLE_NAME + " WHERE ("
+ "aid LIKE '%" + path + "%'"
Copy link
Contributor

Choose a reason for hiding this comment

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

Take care of special characters in SQL statement.

@littlezhou
Copy link
Contributor

  1. Code alignment
  2. Back to the search result
  3. Handle special characters

@littlezhou littlezhou merged commit 628718e into Intel-bigdata:trunk Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants