SSH-Agent
sudo aura -A envoy-git sudo systemctl enable [email protected]
envoy -t ssh-agent -a ssh_key
eval "$(envoy -p)"
JsonNode node = mapper.readValue("[{\"listed_count\":1720,\"status\":{\"retweet_count\":78}}]]", JsonNode.class); | |
System.out.println(node.findValues("retweet_count").get(0).asInt()); |
spark-submit --class com.oreilly.learningsparkexamples.scala.BasicParseJsonWithJackson target/scala-2.10/learning-spark-examples-assembly-0.0.1.jar spark://X61:7077 files/pandainfo.json /tmp/scala-json-out |
SSH-Agent
sudo aura -A envoy-git sudo systemctl enable [email protected]
envoy -t ssh-agent -a ssh_key
eval "$(envoy -p)"
my arch system has installed nearly four years. | |
because systemd make a lot of change and i find my mpd and ssh-agent can not work as use service | |
when i run | |
``` | |
systemctl --user | |
``` | |
return bus file not exist |
check rpm file info rpm -qip /tmp/zookeeper-3.4.5-2.x86_64.rpm
building rpm srpm http://www.owlriver.com/tips/non-root/
rhel 7 close firewall On Redhat 7 Linux system the firewall run as firewalld daemon
systemctrl stop firewalld
// ch5 | |
val rawData = sc.textFile("file:///search/dje/spark-ml/train_noheader.tsv") | |
val records = rawData.map(line => line.split("\t")) | |
records.first() | |
import org.apache.spark.mllib.regression.LabeledPoint | |
import org.apache.spark.mllib.linalg.Vectors | |
val data = records.map { r => | |
val trimmed = r.map(_.replaceAll("\"","")) | |
val label = trimmed(r.size - 1).toInt |
curl -s 'localhost:9200/_cat/allocation?v'
https://thoughts.t37.net/an-elasticsearch-cheat-sheet-9b92c9211d7b
curl -XGET 'localhost:9200/_cat/nodes?v&pretty' curl 'localhost:9200/_cluster/health?pretty'
use python yum module to get os $releasever and $basearch for yum repository python -c 'import yum, pprint; yb = yum.YumBase(); pprint.pprint(yb.conf.yumvar, width=1)'
only sysnc package of newest from remote repository reposync --newest-only -r repo-id
change linux os default default reoute sudo ip route replace default via 10.0.2.2 dev eth0
hive -hiveconf hive.root.logger=DEBUG,console
SELECT User,Host FROM mysql.user; | |
DROP USER 'testuser'@'localhost'; | |
* MySql export schema without data | |
mysqldump -u root -p --no-data dbname > schema.sql | |
mysqldump -u root -p --no-data azkaban > azkaban-schema.sql | |
* how-to-import-an-sql-file-using-the-command-line-in-mysql |