Skip to content

Instantly share code, notes, and snippets.

View jayunit100's full-sized avatar
🎯
Focusing

jay vyas jayunit100

🎯
Focusing
View GitHub Profile
--> Processing Dependency: rubygems for package: rubygem-json-1.5.5-1.el6.x86_64
Packages skipped because of dependency problems:
1:facter-2.1.0-1.el6.x86_64 from puppetlabs-products
hiera-1.3.4-1.el6.noarch from puppetlabs-products
libselinux-ruby-2.0.94-5.3.el6_4.1.x86_64 from rhel-x86_64-server-6
puppet-3.6.2-1.el6.noarch from puppetlabs-products
ruby-augeas-0.4.1-3.el6.x86_64 from puppetlabs-deps
ruby-rgen-0.6.5-2.el6.noarch from puppetlabs-deps
1:ruby-shadow-2.2.0-2.el6.x86_64 from puppetlabs-deps
@jayunit100
jayunit100 / gist:b294c8eae07b07a8c7c0
Created August 6, 2014 18:18
is there a more scala-ish way to do this?
def pow(n:Int , k:Int ) : Int = {
k match {
case 0 => return 1;
case 1 => return n;
case 2 => return n*n;
case _ => ;
}
<property name="user.language" value="en"/>
<property name="awt.toolkit" value="sun.awt.X11.XToolkit"/>
<property name="java.vm.info" value="mixed mode"/>
<property name="java.version" value="1.7.0_65"/>
<property name="java.ext.dirs" value="/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65.x86_64/jre/lib/ext:/usr/java/packages/lib/ext"/>
<property name="securerandom.source" value="file:/dev/./urandom"/>
<property name="sun.boot.class.path" value="/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65.x86_64/jre/lib/resources.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65.x86_64/jre/lib/rt.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65.x86_64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65.x86_64/jre/lib/jsse.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65.x86_64/jre/lib/jce.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65.x86_64/jre/lib/charsets.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65.x86_64/jre/lib/rhino.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65.x86_64/jre/lib/jfr.jar:/usr/lib/jvm/java-1.7
Using as default JAVA_HOME.
Note, this will be overridden by -java-home if it is set.
[info] Loading project definition from /home/jay/Development/spark/project/project
[info] Loading project definition from /home/jay/.sbt/0.13/staging/ec3aa8f39111944cc5f2/sbt-pom-reader/project
[warn] Multiple resolvers having different access mechanism configured with same name 'sbt-plugin-releases'. To avoid conflict, Remove duplicate project resolvers (`resolvers`) or rename publishing resolver (`publishTo`).
[info] Loading project definition from /home/jay/Development/spark/project
[info] Set current project to spark-parent (in build file:/home/jay/Development/spark/)
[info] TriangleCountSuite:
[info] - Count a single triangle
[info] - Count two triangles
[WARNING] [warn] [scoverage] Could not instrument [EmptyTree$/null]. No position.
[WARNING] [warn] [scoverage] Could not instrument [EmptyTree$/null]. No position.
[WARNING] [warn] [scoverage] Could not instrument [EmptyTree$/null]. No position.
[WARNING] [warn] [scoverage] Could not instrument [EmptyTree$/null]. No position.
[INFO] [scoverage]: Instrumentation completed [31268 statements]
[INFO] [scoverage]: Written instrumentation file [/home/jay/Development/spark/core/target/scoverage.coverage.xml]
[INFO] [scoverage]: Writing measurements data to [/home/jay/Development/spark/core/target]
[ERROR] error:
[INFO] while compiling: /home/jay/Development/spark/core/src/main/scala/org/apache/spark/network/Connection.scala
[INFO] during phase: icode
23:23:14-apache~/Development/bigtop-jayunit100/bigtop-deploy/vm/docker-puppet (BIGTOP-1417-final)$ sudo ./docker-hadoop.sh --create 1
/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.6.5/lib/vagrant/pre-rubygems.rb:31: warning: Insecure world writable dir /opt/vagrant/bin/../embedded/bin in PATH, mode 040777
/opt/vagrant/embedded/gems/gems/bundler-1.6.6/lib/bundler/runtime.rb:222: warning: Insecure world writable dir /opt/vagrant/bin/../embedded/bin in PATH, mode 040777
Bringing machine 'bigtop1' up with 'docker' provider...
==> bigtop1: Creating the container...
bigtop1: Name: docker-puppet_bigtop1_1413775398
bigtop1: Image: bigtop/ssh:centos-6.4
bigtop1: Volume: /home/apache/Development/bigtop-jayunit100/bigtop-deploy/puppet:/bigtop-puppet
bigtop1: Volume: /home/apache/Development/bigtop-jayunit100/bigtop-deploy/vm/docker-puppet:/vagrant
bigtop1:
create() {
echo "\$num_instances = $1" > config.rb
vagrant up
echo "nodes..."
nodes=(bigtop1)
echo "hadoop head node"
hadoop_head_node="bigtop1.docker"
echo "............................................."
~ |355 instance Read Color where
~ |356 readsPrec _ value =
~ |357 tryParse [("Red", Red), ("Green", Green), ("Blue", Blue)]
~ |358 where tryParse [] = []
~ |359 tryParse ((attempt, result):xs) =
~ |360 if (take (length attempt) value ) == attempt
~ |361 then [(result, drop (length attempt))]
~ |362 else tryParse xs
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*