Skip to content

Instantly share code, notes, and snippets.

@yssharma
yssharma / test_lens_textart.txt
Last active August 29, 2015 14:26
test lens textart
------------------------------------------------------
* * _
* * | | ___ _ __ ___
* * | |/ _ \ '_ \/ __|
* * | | __/ | | \__ \
* * |_|\___|_| |_|___/
* *
@yssharma
yssharma / Drill-JDBC-Sample
Last active August 29, 2015 14:25
Sample test code for DRILL JDBC
-------------
Dependency
-------------
<dependency>
<groupId>org.apache.drill.exec</groupId>
<artifactId>drill-jdbc</artifactId>
<version>1.1.0</version>
</dependency>
----------
@yssharma
yssharma / DRILL-92.01.patch
Created July 6, 2015 16:36
Apache Drill Cassandra storage patch - Rebased on Drill 1.2.0
commit e1f17a09b6d402e78268753897cbdbd4f8bed169
Author: Yash Sharma <yash360@gmail.com>
Date: Mon Jul 6 09:51:22 2015 +0530
DRILL-92 : Cassandra storage plugin - rebased on Drill-1.2.0
diff --git a/contrib/pom.xml b/contrib/pom.xml
index 8c00e76..0269efb 100644
--- a/contrib/pom.xml
+++ b/contrib/pom.xml
/**
* 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
@yssharma
yssharma / lensserver.log
Last active August 29, 2015 14:20
Apache lens server log
28 Apr 2015 23:17:00,400 [Grizzly-worker(7)] INFO org.apache.hadoop.hive.metastore.MetaStoreDirectSql - MySQL check failed, assuming we are not on mysql: Lexical error at line 1, column 5. Encountered: "@" (64), after : "".
28 Apr 2015 23:17:00,402 [Grizzly-worker(7)] INFO DataNucleus.Query - Reading in results for query "org.datanucleus.store.rdbms.query.SQLQuery@0" since the connection used is closing
28 Apr 2015 23:17:00,402 [Grizzly-worker(7)] INFO org.apache.hadoop.hive.metastore.ObjectStore - Initialized ObjectStore
28 Apr 2015 23:17:00,420 [Grizzly-worker(7)] ERROR hive.ql.metadata.Hive - NoSuchObjectException(message:default.dim_table table not found)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_table(HiveMetaStore.java:1561)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.r
#!/usr/bin/python
class MyUdf:
name = "mysimpleudf"
scope = "SIMPLE"
nulls = "NULL_IF_NULL"
def setup(self):
print 'in setup'
/**
* 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
@yssharma
yssharma / pinterest_tiles.htm
Last active August 29, 2015 14:02
Pinterest type tiles
<style>
/* PINTEREST TYPE TILE STYLES
-------------------------------------------------- */
#wrapper {
width: 90%;
max-width: 1100px;
min-width: 800px;
margin: 50px auto;
@yssharma
yssharma / Hangout.js
Last active August 29, 2015 14:02
Get next G+ hangout : 1st Tuesday of month
//////////////////////////////////////////////////////////////////////////////////
// Version 1
//////////////////////////////////////////////////////////////////////////////////
var getFirstTuesdayOfMonth = function(year, month){
var date = new Date(year, month, 1, 0, 0, 0, 0);
if(date.getDay() < 3){
date.setDate(3-date.getDay());
@yssharma
yssharma / MovieRatingScript.py
Last active April 6, 2022 03:23
Python Script to get movie ratings from IMDB/OMDB and save as file.
import subprocess
import re
import urllib2
import json
import os, sys
import csv, operator
def getMovieList(moviedir_path, movielist_path):
print 'INFO: Creating Movie list.'