#Some discussions on logging from docker: Using logstash Using Papertrail
A lot of this boils down to whether you want a single or multi-process (systemd, supervisord etc.) container...
#Some discussions on logging from docker: Using logstash Using Papertrail
A lot of this boils down to whether you want a single or multi-process (systemd, supervisord etc.) container...
| package com.cym_iot.training.testspark16 | |
| import org.apache.spark.rdd.RDD | |
| import org.apache.spark.sql.catalyst.encoders.ExpressionEncoder | |
| import org.apache.spark.sql.{Dataset, Encoder, SQLContext} | |
| import org.apache.spark.{SparkConf, SparkContext} | |
| import shapeless.tag | |
| import shapeless.tag.@@ | |
| case class IO[A](unsafePerformIO: () => A) { | |
| def map[B](ab: A => B): IO[B] = IO(() => ab(unsafePerformIO())) | |
| def flatMap[B](afb: A => IO[B]): IO[B] =IO(() => afb(unsafePerformIO()).unsafePerformIO()) | |
| def tryIO(ta: Throwable => A): IO[A] = | |
| IO(() => IO.tryIO(unsafePerformIO()).unsafePerformIO() match { | |
| case Left(t) => ta(t) | |
| case Right(a) => a | |
| }) | |
| } | |
| object IO { |
I hereby claim:
To claim this, I am signing this object:
| # Visual Studio Code | |
| # https://code.visualstudio.com/Docs/setup | |
| local _vsc_paths > /dev/null 2>&1 | |
| _vsc_paths=( | |
| "$HOME/Applications/Visual Studio Code.app" | |
| "/Applications/Visual Studio Code.app" | |
| ) | |
| for _vsc_path in $_vsc_paths; do |
| #!/usr/bin/env bash | |
| # | |
| set -euo pipefail | |
| unset SBT_OPTS JVM_OPTS JDK_HOME JAVA_HOME | |
| : ${TRAVIS_SCALA_VERSION:=2.11.8} | |
| : ${SBT_TARGET:=$*} | |
| : ${SBT_TARGET:=test} |
| #!/bin/sh | |
| exec scala -savecompiled "$0" $@ | |
| !# | |
| // | |
| // Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> | |
| // Modified 2014 AI2 <http://www.allenai.org> | |
| // | |
| // This script will check that the commit is correctly formatted. It only checks files that are to be committed. | |
| // To be run this file should be at `.git/hooks/pre-commit`. |
| export CURR_IP_ADDRESS=$(ifconfig | awk '/inet /{print substr($2,0)}' | awk 'END{print}') |
| import shapeless._ | |
| ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
| // THE IMPLICIT CLASS THAT ALLOWS TO CALL #copy ON ANY SEALED TRAIT INSTANCE | |
| ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
| object copySyntax { | |
| implicit class CopySyntax[TypeToCopy](thingToCopy: TypeToCopy) { |
| import fansi.Str | |
| import org.slf4j.LoggerFactory | |
| import scala.util.Try | |
| import scala.util.control.NonFatal | |
| object TablePrinter { | |
| val logger = LoggerFactory.getLogger(TablePrinter.getClass) |