This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Main class for the Cloud Storage API command line sample. | |
* Demonstrates how to make an authenticated API call using OAuth 2 helper classes. | |
*/ | |
public class StorageSample { | |
/** | |
* Be sure to specify the name of your application. If the application name is {@code null} or | |
* blank, the application will log a warning. Suggested format is "MyCompany-ProductName/1.0". | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feb 26, 2014 9:28:05 AM com.google.api.client.http.HttpRequest execute | |
CONFIG: -------------- REQUEST -------------- | |
POST https://accounts.google.com/o/oauth2/token | |
Accept-Encoding: gzip | |
User-Agent: Google-HTTP-Java-Client/1.17.0-rc (gzip) | |
Content-Type: application/x-www-form-urlencoded; charset=UTF-8 | |
Content-Length: 208 | |
Feb 26, 2014 9:28:05 AM com.google.api.client.http.HttpRequest execute | |
CONFIG: curl -v --compressed -X POST -H 'Accept-Encoding: gzip' -H 'User-Agent: Google-HTTP-Java-Client/1.17.0-rc (gzip)' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -d '@-' -- 'https://accounts.google.com/o/oauth2/token' << $$$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
netstat -antu |egrep ':8006|:8007|:8008|:8010' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
du -s /data/sub_dir/*/* | awk '{sum=sum+$1} END {print ((sum / NR) /1024)/1024 " GB"}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
su su - | |
mkdir ~/tmp | |
cd ~/tmp | |
wget http://10.13.130.62:9999/jdk-7u51-linux-x64.rpm | |
rpm -ev jdk | |
rpm -ihv jdk-7u51-linux-x64.rpm | |
update-alternatives --remove-all java | |
update-alternatives --install "/usr/bin/java" "java" "/usr/java/latest/bin/java" 1 | |
update-alternatives --set java /usr/java/latest/bin/java | |
source /usr/lib64/cmf/service/common/cloudera-config.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -u <user> <command>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class | |
WordCountAvroWrite | |
{ | |
public static void | |
main( String[] args ) throws Exception | |
{ | |
String docPath = "sample/data/WC/input.txt"; | |
String wcPath = "sample/data/WC/out"; | |
String schemaFile = "sample/data/WC/input.avsc"; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import java.util.Properties; | |
import org.apache.avro.Schema; | |
import cascading.avro.AvroScheme; | |
import cascading.flow.Flow; | |
import cascading.flow.FlowDef; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source :- http://www.michael-noll.com/blog/2013/03/17/reading-and-writing-avro-files-from-the-command-line/ | |
download tools jar - http://mirror.catn.com/pub/apache/avro/avro-1.7.5/java/avro-tools-1.7.5.jar | |
add following to ~/.bashrc | |
alias avro='java -jar /home/yash/software/avro/avro-tools-1.7.5.jar' | |
now use just as avro command | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -r --no-parent --no-host-directories --reject "mirror*,index*" http://rpm.datastax.com/community/ |