Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.project
.settings
.classpath
.idea
target
/ClusterControllerService/
30 changes: 15 additions & 15 deletions vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ public class VXQuery {
/**
* Constructor to use command line options passed.
*
* @param opts
* Command line options object
* @param opts Command line options object
*/
public VXQuery(CmdLineOptions opts) {
this.opts = opts;
Expand Down Expand Up @@ -240,23 +239,24 @@ private void runQueries() throws IOException, SystemException, Exception {
* @throws Exception
*/
private String[] getNodeList() throws Exception {
Map<String, NodeControllerInfo> nodeControllerInfos = hcc.getNodeControllerInfos();
String[] nodeList = new String[nodeControllerInfos.size()];
int index = 0;
for (String node : nodeControllerInfos.keySet()) {
nodeList[index++] = node;
if (hcc != null) {
Map<String, NodeControllerInfo> nodeControllerInfos = hcc.getNodeControllerInfos();
String[] nodeList = new String[nodeControllerInfos.size()];
int index = 0;
for (String node : nodeControllerInfos.keySet()) {
nodeList[index++] = node;
}
return nodeList;
}
return nodeList;
return null;
}

/**
* Creates a Hyracks dataset, if not already existing with the job frame size, and 1 reader. Allocates a new buffer of size specified in the frame of Hyracks
* node. Creates new dataset reader with the current job ID and result set ID. Outputs the string in buffer for each frame.
*
* @param spec
* JobSpecification object, containing frame size. Current specified job.
* @param writer
* Writer for output of job.
* @param spec JobSpecification object, containing frame size. Current specified job.
* @param writer Writer for output of job.
* @throws Exception
*/
private void runJob(JobSpecification spec, PrintWriter writer) throws Exception {
Expand Down Expand Up @@ -339,8 +339,7 @@ public void stopLocalHyracks() throws Exception {
/**
* Reads the contents of file given in query into a String. The file is always closed. For XML files UTF-8 encoding is used.
*
* @param query
* The query with filename to be processed
* @param query The query with filename to be processed
* @return UTF-8 formatted query string
* @throws IOException
*/
Expand All @@ -362,7 +361,8 @@ private static void timingMessage(String message) {
* Helper class with fields and methods to handle all command line options
*/
private static class CmdLineOptions {
@Option(name = "-available-processors", usage = "Number of available processors. (default: java's available processors)")
@Option(name = "-available-processors",
usage = "Number of available processors. (default: java's available processors)")
private int availableProcessors = -1;

@Option(name = "-client-net-ip-address", usage = "IP Address of the ClusterController.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,11 @@ public static AlgebricksPartitionConstraint getClusterLocations(String[] nodeLis

public static AlgebricksPartitionConstraint getClusterLocations(String[] nodeList, int partitions) {
ArrayList<String> locs = new ArrayList<String>();
for (String node : nodeList) {
for (int j = 0; j < partitions; j++) {
locs.add(node);
if (nodeList != null) {
for (String node : nodeList) {
for (int j = 0; j < partitions; j++) {
locs.add(node);
}
}
}
String[] cluster = new String[locs.size()];
Expand Down