Skip to content

Instantly share code, notes, and snippets.

View Leemoonsoo's full-sized avatar

Lee moon soo Leemoonsoo

View GitHub Profile
@Leemoonsoo
Leemoonsoo / test.py
Created July 16, 2015 13:12
Zeppelin merge pr for testing
#!/usr/bin/python
#
# 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
@Leemoonsoo
Leemoonsoo / gist:d3b255c0d3f66cb934d5
Created June 23, 2015 19:34
Read spark default in Apache Zeppelin. place this scripts inside of your conf/zeppelin-env.sh
function readSparkConf() {
SPARK_CONF_PATH="${1}"
echo "Reading ${SPARK_CONF_PATH}"
while read line; do
echo "${line}" | grep -e "^spark[.]" > /dev/null
if [ $? -ne 0 ]; then
# skip the line not started with 'spark.'
continue;
fi
SPARK_CONF_KEY=`echo "${line}" | sed -e 's/\(^spark[^ ]*\)[ \t]*\(.*\)/\1/g'`