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
| trait ConvertToInt { | |
| fn to_int(&self) -> Option<i64>; | |
| } | |
| impl ConvertToInt for String { | |
| fn to_int(&self) -> Option<i64> { | |
| let buf = self.as_slice(); | |
| let result: Option<i64> = from_str(buf); | |
| return result | |
| } |
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
| 6:45:35 PM SBT project import | |
| [warn] [FAILED ] org.scala-sbt#compiler-interface;0.13.5!compiler-interface.jar(src): (0ms) | |
| [warn] ==== local: tried | |
| [warn] /Users/jhaddad/.ivy2/local/org.scala-sbt/compiler-interface/0.13.5/srcs/compiler-interface-sources.jar | |
| [warn] ==== typesafe-ivy-releases: tried | |
| [warn] http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.5/srcs/compiler-interface-sources.jar | |
| [warn] ==== public: tried | |
| [warn] http://repo1.maven.org/maven2/org/scala-sbt/compiler-interface/0.13.5/compiler-interface-0.13.5-sources.jar | |
| [warn] :::::::::::::::::::::::::::::::::::::::::::::: | |
| [warn] :: FAILED DOWNLOADS :: |
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
| /Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/bin/java -Didea.launcher.port=7532 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 14.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/lib/javafx-doclet.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/lib/tools.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/jre/lib/htmlconverte |
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
| # original guide http://steamcommunity.com/sharedfiles/filedetails/?id=360404397 | |
| # as root | |
| apt-get install lib32gcc1 | |
| adduser steam | |
| # as steam user | |
| wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz | |
| tar zxvf steamcmd_linux.tar.gz | |
| ./steamcmd.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
| jhaddad@Jons-Mac-Pro ~/dev/cql-ffi$ cargo build master | |
| Compiling cql_ffi v0.0.5 (file:///Users/jhaddad/dev/cql-ffi) | |
| error: linking with `cc` failed: exit code: 1 | |
| note: cc '-m64' '-L' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib' '-o' '/Users/jhaddad/dev/cql-ffi/target/batch' '/Users/jhaddad/dev/cql-ffi/target/batch.o' '-Wl,-force_load,/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libmorestack.a' '-Wl,-dead_strip' '-nodefaultlibs' '/Users/jhaddad/dev/cql-ffi/target/libcql_ffi-f2ab9486e3b15b25.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libstd-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libcollections-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libunicode-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/librand-4e7c5e5c.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liballoc-4e7c5e5c.rlib' '/usr/local/lib/ |
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
| struct Vertex { | |
| id: i32, | |
| } | |
| impl Vertex { | |
| fn test(&mut self, num:i32) { | |
| self.id = num; | |
| } | |
| } |
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
| Py4JJavaError: An error occurred while calling z:org.apache.spark.api.python.PythonRDD.collectAndServe. | |
| : java.lang.NoSuchMethodError: com.datastax.driver.core.Metadata.getTokenRanges()Ljava/util/Set; | |
| at com.datastax.spark.connector.rdd.partitioner.CassandraRDDPartitioner$$anonfun$com$datastax$spark$connector$rdd$partitioner$CassandraRDDPartitioner$$describeRing$1.apply(CassandraRDDPartitioner.scala:41) | |
| at com.datastax.spark.connector.rdd.partitioner.CassandraRDDPartitioner$$anonfun$com$datastax$spark$connector$rdd$partitioner$CassandraRDDPartitioner$$describeRing$1.apply(CassandraRDDPartitioner.scala:39) | |
| at com.datastax.spark.connector.cql.CassandraConnector$$anonfun$withClusterDo$1.apply(CassandraConnector.scala:111) | |
| at com.datastax.spark.connector.cql.CassandraConnector$$anonfun$withClusterDo$1.apply(CassandraConnector.scala:110) | |
| at com.datastax.spark.connector.cql.CassandraConnector$$anonfun$withSessionDo$1.apply(CassandraConnector.scala:100) | |
| at com.datastax.spark.connector.cql.CassandraConnector$$a |
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
| PYSPARK_ROOT=/Users/jhaddad/dev/pyspark-cassandra/target | |
| export PYSPARK_DRIVER_PYTHON=ipython PYSPARK_DRIVER_PYTHON_OPTS="notebook" | |
| pyspark \ | |
| --jars ${PYSPARK_ROOT}/pyspark_cassandra-0.1.4.jar \ | |
| --driver-class-path ${PYSPARK_ROOT}/pyspark_cassandra-0.1.4.jar \ | |
| --py-files ${PYSPARK_ROOT}/pyspark_cassandra-0.1.4-py2.7.egg \ | |
| --conf spark.cassandra.connection.host=127.0.0.1 \ | |
| --master spark://127.0.0.1:7077 \ |
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
| jhaddad@jhaddad-rmbp15 ~/dev$ wget https://bintray.com/artifact/download/aragozin/generic/sjk-plus-0.3.6.jarjava -jar sjk-plus-0.3.6.jar | |
| jhaddad@jhaddad-rmbp15 ~/dev$ java -jar sjk-plus-0.3.6.jar ttop -s localhost:7199 -o CPU -n 30 | |
| Monitoring threads ... | |
| 2015-06-20T14:17:01.194-0400 Process summary | |
| process cpu=7.00% | |
| application cpu=3.02% (user=2.72% sys=0.30%) | |
| other: cpu=3.98% | |
| heap allocation rate 914kb/s |
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
| from pyspark.sql import SQLContext | |
| sql = SQLContext(sc) | |
| apd = sql.read.format("org.apache.spark.sql.cassandra").load(keyspace="labor", table="average_price_data") |