Skip to content

Commit

Permalink
Merge pull request #21 from mindprince/query-names
Browse files Browse the repository at this point in the history
Add support for assigning query-names.
  • Loading branch information
rohitagarwal003 committed Oct 21, 2014
2 parents d4251be + baa2266 commit 28e922c
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/qubole/qds/sdk/java/api/CommandApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public interface CommandApi

/**
* @param query the query to be run
* @param db_tap_id the db_tap id where the query will be run
* @param dbTapId the db_tap id where the query will be run
* @return new builder
*/
public InvokableBuilder<CommandResponse> dbTapQuery(String query, int dbTapId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ public enum SubCommandType
public HadoopCommandBuilder sub_command_args(String sub_command_args);

public HadoopCommandBuilder clusterLabel(String clusterLabel);

public HadoopCommandBuilder name(String commandName);
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ public interface HiveCommandBuilder extends InvokableBuilder<CommandResponse>
public HiveCommandBuilder macro(String name, String value);

public HiveCommandBuilder clusterLabel(String clusterLabel);

public HiveCommandBuilder name(String queryName);
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ public interface PigCommandBuilder extends InvokableBuilder<CommandResponse>
public PigCommandBuilder latin_statements(String latin_statements);

public PigCommandBuilder clusterLabel(String clusterLabel);

public PigCommandBuilder name(String commmandName);
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ public interface PrestoCommandBuilder extends InvokableBuilder<CommandResponse>
public PrestoCommandBuilder query(String query);

public PrestoCommandBuilder clusterLabel(String clusterLabel);

public PrestoCommandBuilder name(String queryName);
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ public interface ShellCommandBuilder extends InvokableBuilder<CommandResponse>
public ShellCommandBuilder archives(List<String> archiveList);

public ShellCommandBuilder clusterLabel(String clusterLabel);

public ShellCommandBuilder name(String commandName);
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ public HadoopCommandBuilder clusterLabel(String clusterLabel)
return this;
}

@Override
public HadoopCommandBuilder name(String commandName) {
node.put("name", commandName);
return this;
}

@Override
protected ObjectNode getEntity()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ public HiveCommandBuilder clusterLabel(String clusterLabel)
return this;
}

@Override
public HiveCommandBuilder name(String queryName) {
node.put("name", queryName);
return this;
}

@Override
protected ObjectNode getEntity()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ public PigCommandBuilder clusterLabel(String clusterLabel)
return this;
}

@Override
public PigCommandBuilder name(String commmandName) {
node.put("name", commmandName);
return this;
}

@Override
protected ObjectNode getEntity()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ public PrestoCommandBuilder clusterLabel(String clusterLabel)
return this;
}

@Override
public PrestoCommandBuilder name(String queryName) {
node.put("name", queryName);
return this;
}

@Override
protected ObjectNode getEntity()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ public ShellCommandBuilder clusterLabel(String clusterLabel)
return this;
}

@Override
public ShellCommandBuilder name(String commandName) {
node.put("name", commandName);
return this;
}

@Override
protected ObjectNode getEntity()
{
Expand Down

0 comments on commit 28e922c

Please sign in to comment.