Skip to content

Instantly share code, notes, and snippets.

View HotSushi's full-sized avatar

Sushant Raikar HotSushi

View GitHub Profile
java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:203)
at org.apache.iceberg.shaded.com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsen
t(BoundedLocalCache.java:2296)
at org.apache.iceberg.shaded.com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(Local
Cache.java:111)
at org.apache.iceberg.shaded.com.github.benmanes.caffeine.cache.LocalManualCache.get(LocalManual
Cache.java:54)
at org.apache.iceberg.SchemaParser.fromJson(SchemaParser.java:247)
at org.apache.iceberg.mr.hive.HiveIcebergSerDe.initialize(HiveIcebergSerDe.java:42)
2020-10-08 21:16:14,464 WARN [main] org.apache.hadoop.mapred.YarnChild: Exception running child : java.lang.RuntimeException: Error in configuring object
at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:113)
at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:79)
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:137)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:456)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:177)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1893)
@HotSushi
HotSushi / TestHiveIcebergStructs.java
Created September 11, 2020 20:29
Iceberg-hive failing test
/*
* Licensed 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@HotSushi
HotSushi / logstash.diff
Created May 31, 2016 13:04
Elixir logging PR
diff --git a/config/config.exs b/config/config.exs
index 765a865..3e51c13 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -58,7 +58,9 @@ config :lager,
config :logger, :info,
path: "logs/info.log",
- level: :info
+ level: :info,
Given a sorted array of n integers that hasbeen rotated an unknown number of times,
write code to find an element in the array.
You may assume that the array was originally sorted in increasing order.
EXAMPLE
Input: find 5 in {15, 16, 19, 20, 25, 1, 3, 4, 5, 7, 10, 14}
Output: 8 (the index of 5 in the array)
a = [2, 4, 1, 3, 5]
def mergesort(a):
mid = int(len(a)/2)
if len(a) < 2:
return [0,a]
[inv1,sor1] = mergesort(a[:mid])
[inv2,sor2] = mergesort(a[mid:])
ar, inv = [], 0
while sor1 or sor2:
if sor1 and not sor2:
L = ['R','B','B','W','B','W','R','W','R']
r = 0
b = len(L)-1
while r!= b:
while(L[r] in ['R','W']):
r += 1
while(L[b] in ['B','W']):
b -= 1
if r>= b:
break;
@HotSushi
HotSushi / Log
Created August 20, 2015 09:56
SleekXMPP error
DEBUG Loaded Plugin: RFC 6120: Stream Feature: STARTTLS
DEBUG Loaded Plugin: RFC 6120: Stream Feature: Resource Binding
DEBUG Loaded Plugin: RFC 3920: Stream Feature: Start Session
DEBUG Loaded Plugin: RFC 6121: Stream Feature: Roster Versioning
DEBUG Loaded Plugin: RFC 6121: Stream Feature: Subscription Pre-Approval
DEBUG Loaded Plugin: RFC 6120: Stream Feature: SASL
DEBUG Connecting to 127.0.0.1:5280
DEBUG Event triggered: connected
DEBUG ==== TRANSITION disconnected -> connected
DEBUG Starting HANDLER THREAD
@HotSushi
HotSushi / enabledisablejs.patch
Last active August 29, 2015 14:16
splash::enable_js(), splash::disable_js() Lua commands, but works only before actually loading the target page.
diff --git a/splash/browser_tab.py b/splash/browser_tab.py
index 9cd613d..d3567dd 100644
--- a/splash/browser_tab.py
+++ b/splash/browser_tab.py
@@ -120,6 +120,17 @@ class BrowserTab(QObject):
if self.visible:
web_page.settings().setAttribute(QWebSettings.DeveloperExtrasEnabled, True)
+ def enable_js(self):
+ settings = self.web_page.settings()
@HotSushi
HotSushi / Error Report
Created March 10, 2015 07:55
error if I do $ python -m splash.server
hotsushi@ubuntu:~/splash$ python -m splash.server --port=5000
2015-03-10 13:18:21+0530 [-] Log opened.
2015-03-10 13:18:21.979907 [-] Splash version: 1.5
2015-03-10 13:18:21.980356 [-] Qt 4.8.6, PyQt 4.10.4, WebKit 537.21, sip 4.15.5, Twisted 13.2.0, Lua 5.2
2015-03-10 13:18:21.980434 [-] Open files limit: 1024
2015-03-10 13:18:21.980476 [-] Open files limit increased from 1024 to 4096
2015-03-10 13:18:21.986991 [-] Traceback (most recent call last):
2015-03-10 13:18:21.987108 [-] File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
2015-03-10 13:18:21.987183 [-] "__main__", fname, loader, pkg_name)
2015-03-10 13:18:21.987253 [-] File "/usr/lib/python2.7/runpy.py", line 72, in _run_code