Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Comparable seats to Boeing 787 11a</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 2em;
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
a
2
3
5
10
99
import sys
from pyspark.sql import SparkSession
if __name__ == "__main__":
spark = SparkSession\
.builder\
.appName("TestSql")\
.config("spark.yarn.access.hadoopFileSystems", sys.argv[1])\
.getOrCreate()
#
# cde spark submit run_cde_cli.py \
# --file /home/runner/cde \
# --file /home/runner/.cdp/credentials \
# --conf spark.kubernetes.driverEnv.CDE_USER=curtis \
# --conf spark.kubernetes.driverEnv.CDE_VCLUSTER_ENDPOINT=https://frwglzhk.cde-2hkxc42s.curtis1.a465-9q4k.cloudera.site/dex/api/v1 \
# --conf spark.kubernetes.driverEnv.CDE_CREDENTIALS_FILE=/app/mount/credentials
import subprocess
while true;
echo "Name Pid Swap Kb"
do
for file in /proc/*/status ; do
awk '/VmSwap|Name|Tgid/{printf $2 "\t" $3 }END{print ""}' $file;
done | grep -i kb | sort -k 3 -n -r |head -10;
echo ------Showing top 10 only -----Sleeping-----------;
sleep 3;
done
/* A simple HBase client to test 'get' retrieval time.
*
* Run 'hbase shell' and create the test table and data we'll use:
* create 'get_test', 'cf1'
* put 'get_test',0,'cf1:numbers','zero'
* put 'get_test',1,'cf1:numbers','one'
* put 'get_test',2,'cf1:numbers','two'
* put 'get_test',3,'cf1:numbers','three'
* put 'get_test',4,'cf1:numbers','four'
* put 'get_test',5,'cf1:numbers','five'
@curtishoward
curtishoward / JDBCTest.java
Last active July 11, 2019 14:15
JDBC connection testing
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
public class JDBCTest {
public static void main(String[] args) throws Exception {
Connection con = null;
long start, end, driver_time, connect_time, query_time;