************************need to run all following commands from directory: fullstack-0.2.2/hyracks/ ***********************
-----------------------on virtual cluster -------------------
********************Step 1: Start a "virtual" Hyracks Cluster***************************
#Start the Cluster Controller by running: 

hyracks-server/target/hyracks-server-0.2.2-binary-assembly/bin/hyrackscc -cluster-net-ip-address 127.0.0.1 -client-net-ip-address 127.0.0.1


#Start a Node Controller (in another console window).

hyracks-server/target/hyracks-server-0.2.2-binary-assembly/bin/hyracksnc -cluster-net-ip-address 127.0.0.1 -cc-host localhost -data-ip-address 127.0.0.1 -node-id NC1


#Start another Node Controller (in another console window).

hyracks-server/target/hyracks-server-0.2.2-binary-assembly/bin/hyracksnc -cluster-net-ip-address 127.0.0.1 -cc-host localhost -data-ip-address 127.0.0.1 -node-id NC2

#You should see a message saying the node controller has been started and the window with the Cluster Controller should show heartbeat messages from NC1 & NC2
#At this time you have successfully started a Cluster Controller and 2 Node Controllers to create a virtual Hyracks cluster. 

***********************Step 2: Deploy a Hyracks application ************************************
#in another console window, run following command to get hyracks> prompt:
hyracks-cli/target/hyracks-cli-0.2.2-binary-assembly/bin/hyrackscli

hyracks> connect to "localhost";

#At this time we are ready to deploy a Hyracks application using the Hyracks command-line client.
#The application we are going to deploy as part of this exercise is the "text-example" that can be found in following zip file
#absolute path to example zip : /home/mayuri/fullstack-0.2.2/hyracks/hyracks-examples/text-example/textapp/target/textapp-0.2.2-app-assembly.zip

#on cli(hyracks>) prompt: type as:
create application text "/home/mayuri/fullstack-0.2.2/hyracks/hyracks-examples/text-example/textapp/target/textapp-0.2.2-app-assembly.zip";

#When this command returns, the application has been successfully deployed in the Hyracks Cluster Controller. 

*************************Step 3: Run the word count example******************************
#Now, test data files are in: /home/mayuri/fullstack-0.2.2/hyracks/hyracks-examples/hyracks-integration-tests/data
#From "another console window", run the following script:

hyracks-examples/text-example/textclient/target/textclient-0.2.2-binary-assembly/bin/textclient -host localhost -app text -infile-splits "NC1:/home/mayuri/fullstack-0.2.2/hyracks/hyracks-examples/hyracks-integration-tests/data/simple.txt" -outfile-splits "NC2:/tmp/output" -algo hash

#The above script will run the word count example on the given data files and write the output to /tmp/output. 

#You can run another example with multiple input files:

hyracks-examples/text-example/textclient/target/textclient-0.2.2-binary-assembly/bin/textclient -host localhost -app text -infile-splits "NC1:/home/mayuri/fullstack-0.2.2/hyracks/hyracks-examples/hyracks-integration-tests/data/words.txt,NC1:/home/mayuri/fullstack-0.2.2/hyracks/hyracks-examples/hyracks-integration-tests/data/simple.txt" -outfile-splits "NC2:/tmp/output" -algo hash
---------------------------------------------------------------------------------------------------------------------------------------------



---------------- on actual cluster of multiple physical machines------------------------------------------------------------------------------
#build hyracks and copy that full stack folder to all machine at the same location.
#start cc 
hyracks-server/target/hyracks-server-0.2.2-binary-assembly/bin/hyrackscc -cluster-net-ip-address 10.129.22.81 -client-net-ip-address 10.129.22.81

ssh hduser@10.129.22.11
cd /home/hduser/fullstack-0.2.2/hyracks/
hyracks-server/target/hyracks-server-0.2.2-binary-assembly/bin/hyracksnc -cluster-net-ip-address 10.129.22.11 -cc-host 10.129.22.81 -data-ip-address 10.129.22.11 -node-id NC1


ssh hduser@10.129.22.32
cd /home/hduser/fullstack-0.2.2/hyracks/
hyracks-server/target/hyracks-server-0.2.2-binary-assembly/bin/hyracksnc -cluster-net-ip-address 10.129.22.32 -cc-host 10.129.22.81 -data-ip-address 10.129.22.32 -node-id NC2


#in another console to get hyracks> prompt:
hyracks-cli/target/hyracks-cli-0.2.2-binary-assembly/bin/hyrackscli

hyracks> connect to "10.129.22.81";


#on cli prompt: type as:
create application text2 "/home/hduser/fullstack-0.2.2/hyracks/hyracks-examples/text-example/textapp/target/textapp-0.2.2-app-assembly.zip";

#From "another console window", run the following script:

hyracks-examples/text-example/textclient/target/textclient-0.2.2-binary-assembly/bin/textclient -host "10.129.22.81" -app text2 -infile-splits "NC1:/home/hduser/fullstack-0.2.2/hyracks/hyracks-examples/hyracks-integration-tests/data/simple.txt" -outfile-splits "NC2:/tmp/output" -algo hash

OR

hyracks-examples/text-example/textclient/target/textclient-0.2.2-binary-assembly/bin/textclient -host "10.129.22.81" -app text2 -infile-splits "NC1:/home/hduser/fullstack-0.2.2/hyracks/hyracks-examples/hyracks-integration-tests/data/simple.txt, NC1:/home/hduser/fullstack-0.2.2/hyracks/hyracks-examples/hyracks-integration-tests/data/simple2.txt" -outfile-splits "NC2:/tmp/output" -algo hash