Skip to content

Instantly share code, notes, and snippets.

Avatar

Pratik Khadloya tispratik

View GitHub Profile
View gist:270869e17aaaf0d1b092
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)
View parquet_columns_reader2.java
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 Aug 29, 2015
Hive 0.13 sqoop import as parquetfile
View 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 Feb 5, 2015
Testing argparse for exception
View gist:aebff28b8c5afd7bee59
try:
input_args = []
arg_parse_utils.parse_args(arg_meta_list, input_args)
except SystemExit:
pass
View gist:132996
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
View gist:830214
# -*- mode: ruby -*-
require 'sinatra'
require 'rubygems'
require 'bundler/setup'
#require 'lib/java'
#require 'rack/handler/glassfish'
set :run, false
set :public, './public'
View gist:830216
# 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)
View gist:1019849
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 Feb 6, 2012 — forked from chriscoyier/dabblet.css
Based on email I got from andrea ricci
View dabblet.css
/* 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 Feb 6, 2012 — forked from chriscoyier/dabblet.css
Based on email I got from andrea ricci
View dabblet.css
/* 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 {
You can’t perform that action at this time.