Skip to content

Instantly share code, notes, and snippets.

Avatar

Lee moon soo Leemoonsoo

View GitHub Profile
@Leemoonsoo
Leemoonsoo / test.py
Created Jul 16, 2015
Zeppelin merge pr for testing
View test.py
#!/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 Jun 23, 2015
Read spark default in Apache Zeppelin. place this scripts inside of your conf/zeppelin-env.sh
View gist:d3b255c0d3f66cb934d5
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'`