Skip to content

Instantly share code, notes, and snippets.

@prazanna
prazanna / SubstringTest.java
Created September 28, 2017 05:14
Java 8 Substring taking linear time
import java.nio.CharBuffer;
import java.time.Duration;
import java.time.Instant;
public class SubstringTest
{
public static Duration testSubstring(String input)
{
Instant start = Instant.now();
String subString;
@prazanna
prazanna / HoodieRecordReader,java
Created April 3, 2017 20:21
HoodieRecordReader - Notes
package com.uber.hoodie.hadoop;
import com.google.common.base.Preconditions;
import com.uber.hoodie.common.model.HoodieAvroPayload;
import com.uber.hoodie.common.model.HoodieRecord;
import com.uber.hoodie.exception.HoodieIOException;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.apache.hadoop.fs.FileSystem;
16/06/24 03:13:22 INFO model.HoodieCommitMetadata: partition path is null for [HoodieWriteStat {fileId='null', prevCommit='null', numWrites=0, numWriteBytes=0}, HoodieWriteStat {fileId='null', prevCommit='null', numWrites=0, numWriteBytes=0}, HoodieWriteStat {fileId='null', prevCommit='null', numWrites=0, numWriteBytes=0}, HoodieWriteStat {fileId='null', prevCommit='null', numWrites=0, numWriteBytes=0}, HoodieWriteStat {fileId='null', prevCommit='null', numWrites=0, numWriteBytes=0}, HoodieWriteStat {fileId='null', prevCommit='null', numWrites=0, numWriteBytes=0}, HoodieWriteStat {fileId='null', prevCommit='null', numWrites=0, numWriteBytes=0}, HoodieWriteStat {fileId='null', prevCommit='null', numWrites=0, numWriteBytes=0}, HoodieWriteStat {fileId='null', prevCommit='null', numWrites=0, numWriteBytes=0}, HoodieWriteStat {fileId='null', prevCommit='null', numWrites=0, numWriteBytes=0}, HoodieWriteStat {fileId='null', prevCommit='null', numWrites=0, numWriteBytes=0}, HoodieWriteStat {fileId='null', prevCommit=
Jul 21, 2015 12:40:45 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/synergy] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation.
2015-07-21 12:40:45,759 [http-bio-9080-exec-145] ERROR (DefaultExceptionMapper.java:24) Handling unknown exception.
java.lang.IllegalStateException: The clusterIdCustomerCache Cache is not alive (STATUS_SHUTDOWN)
at net.sf.ehcache.Cache$CacheStatus.checkAlive(Cache.java:4298)
at net.sf.ehcache.Cache.checkStatus(Cache.java:2731)
at net.sf.ehcache.Cache.get(Cache.java:1610)
at org.springframework.cache.ehcache.EhCacheCache.get(EhCacheCache.java:61)
at com.cloudera.cops.synergy.service.support.bundle.ClusterIdNameCache.lookupClustersForCustomer(ClusterIdNameCache.java:113)
at com.cloudera.cops.synergy.service.support.bundle.ClusterIdNameCache$$FastCla
[root@snow-002 synergy.observer-1.5-SNAPSHOT]# for i in /proc/*/fd
> do
> [ -r $i ] && printf "%6d : %d\n" $(basename $(dirname $i)) $(ls $i | wc -l)
> done
100 : 0
101 : 0
102 : 0
103 : 0
10424 : 9
10433 : 9
2015-07-20 13:40:24,789 taskScheduler-1 ERROR com.cloudera.cops.synergy.observer.hbase.HBaseReplicationLogScheduler � Error replicating table machine_collection_replication key java.nio.HeapByteBuffer[pos=0 lim=75 cap=75]
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:714)
at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:949)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1360)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:110)
at org.apache.hadoop.hbase.client.AsyncProcess$AsyncRequestFutureImpl.sendMultiAction(AsyncProcess.java:956)
at org.apache.hadoop.hbase.client.AsyncProcess$AsyncRequestFutureImpl.access$000(AsyncProcess.java:574)
at org.apache.hadoop.hbase.client.AsyncProcess.submitMultiActions(AsyncProcess.java:423)
struct request {
int request_no;
opaque image<5000000>;
};
struct response {
int request_no;
opaque image<5000000>;
};
#include <errno.h>
#include <getopt.h>
#include <signal.h>
#include <strings.h>
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include "gfserver.h"
\