Skip to content

Instantly share code, notes, and snippets.

View tispratik's full-sized avatar

Pratik Khadloya tispratik

View GitHub Profile
2014-07-29 12:47:46
Full thread dump Java HotSpot(TM) 64-Bit Server VM (14.2-b01 mixed mode):
"qtp1680568263-28" prio=10 tid=0x00007f79d0001000 nid=0x71ce waiting on condition [0x00007f7a15545000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00007f7a8da1aa38> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1963)
at org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:320)
@tispratik
tispratik / parquet_columns_reader2.java
Created August 28, 2014 19:43
Parquet columns reader2
package com.company.grid.lookup_new;
import parquet.column.ColumnDescriptor;
import parquet.column.ColumnReader;
import parquet.column.impl.ColumnReadStoreImpl;
import parquet.column.page.PageReadStore;
import parquet.hadoop.ParquetFileReader;
import parquet.hadoop.metadata.BlockMetaData;
import parquet.hadoop.metadata.ParquetMetadata;
import parquet.io.api.Binary;
@tispratik
tispratik / Hive 0.13 sqoop import as parquetfile
Last active August 29, 2015 14:06
Hive 0.13 sqoop import as parquetfile
bin/sqoop import -jt <jt> --connect <dburl> --username <user> --password <pwd> --query "SELECT ..... WHERE \$CONDITIONS" --num-mappers 1 --mapreduce-job-name test_sqoop_import --as-parquetfile --target-dir /user/pkhadloya/sqoop/test --delete-target-dir --hive-import --hive-table test --create-hive-table --verbose
Warning: /hell does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
Warning: /home/pkhadloya/sqoop-7e14e38/bin/../../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
14/09/19 10:58:12 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-SNAPSHOT
14/09/19 10:58:12 DEBUG tool.BaseSqoopTool: Enabled debug logging.
14/09/19 10:58:12 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
14/09/19 10:58:12 INFO tool.BaseSqoopTool: Using Hive-specific delimiters for output. You can override
14/09/19 10:58:12 INFO tool.BaseSqoopTool: delimi
@tispratik
tispratik / gist:aebff28b8c5afd7bee59
Created February 5, 2015 18:06
Testing argparse for exception
try:
input_args = []
arg_parse_utils.parse_args(arg_meta_list, input_args)
except SystemExit:
pass
Am getting the following error:
Modul(#36555780) expected, got String(#21132310)
After doing a lot of research on the net, i found that i need to pass
on the id field somehow, but i dont really know how to do it.
Following is the model:
---------------------------------
class Modul < ActiveRecord::Base
belongs_to :modulable, :polymorphic => true
# -*- mode: ruby -*-
require 'sinatra'
require 'rubygems'
require 'bundler/setup'
#require 'lib/java'
#require 'rack/handler/glassfish'
set :run, false
set :public, './public'
# Disable automatic framework detection by uncommenting/setting to false
Warbler.framework_detection = false
# Warbler web application assembly configuration file
Warbler::Config.new do |config| config.java_libs += FileList["lib/java/*.jar"]
# Features: additional options controlling how the jar is built.
# Currently the following features are supported:
# - gemjar: package the gem repository in a jar file in WEB-INF/lib
# config.features = %w(gemjar)
@tispratik
tispratik / gist:1019849
Created June 10, 2011 21:50
God Config File
God.log_level = :debug
ENV['RAILS_ENV'] ||= "staging"
ENV['RAILS_ROOT'] ||= ENV['RAILS_ENV'] == "development" ? "." : "/home/rails/public_html/myapp/current"
ENV['GOD_UID'] ||= ENV['RAILS_ENV'] == "development" ? ENV["LOGNAME"] : "rails"
ENV['GOD_GID'] ||= ENV['RAILS_ENV'] == "development" ? "staff" : "rails"
puts "God is starting with:"
puts "RAILS_ENV = #{ENV['RAILS_ENV']}"
puts "RAILS_ROOT = #{ENV['RAILS_ROOT']}"
@tispratik
tispratik / dabblet.css
Created February 6, 2012 08:29 — forked from chriscoyier/dabblet.css
Based on email I got from andrea ricci
/* Based on email I got from andrea ricci */
a[href^="mailto:"]:before { content: "\2709"; }
.phone:before { content: "\2706"; }
.important:before { content: "\27BD"; }
blockquote:before { content: "\275D"; }
blockquote:after { content: "\275E"; }
.alert:before { content: "\26A0"; }
:before, :after {
@tispratik
tispratik / dabblet.css
Created February 6, 2012 08:29 — forked from chriscoyier/dabblet.css
Based on email I got from andrea ricci
/* Based on email I got from andrea ricci */
a[href^="mailto:"]:before { content: "\2709"; }
.phone:before { content: "\2706"; }
.important:before { content: "\27BD"; }
blockquote:before { content: "\275D"; }
blockquote:after { content: "\275E"; }
.alert:before { content: "\26A0"; }
:before, :after {