Skip to content

Instantly share code, notes, and snippets.

View dvbobrov's full-sized avatar

Dmitry Bobrov dvbobrov

View GitHub Profile
@dvbobrov
dvbobrov / spark-env.sh
Created July 4, 2016 20:44
Making spark-submit work with s3a:// URLs
SPARK_DIST_CLASSPATH="/opt/spark/lib/aws-java-sdk-1.7.4.jar:/opt/spark/lib/hadoop-aws-2.6.0.jar"
localhost:main dmitry$ javap -p -c X\$Y
Compiled from "X.scala"
public class X$Y {
public X$Y();
Code:
0: aload_0
1: invokespecial #9 // Method java/lang/Object."<init>":()V
4: return
}
@dvbobrov
dvbobrov / gist:6f13176f9eeffebae355
Created April 9, 2015 19:12
WPF backwards compatibility issue
namespace WpfApplication1
{
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Windows;
using System.Windows.Data;
---- 8< (cut here) -----------------------------------------
Java(TM) SE Runtime Environment, 1.8.0-b132
Java HotSpot(TM) 64-Bit Server VM, 25.0-b70
Linux, 3.12.9-calculate, amd64
Burning up to figure out the exact CPU count....... done!
Running with 1 threads and [-client]:
granularity_currentTime: 991014.722 +- 1795.988 ns
granularity_nanotime: 27.838 +- 0.044 ns
package com.dbobrov.benchmark;
import org.openjdk.jmh.annotations.*;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.TimeUnit;
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
package com.dbobrov.benchmark;
import org.openjdk.jmh.annotations.*;
import java.util.concurrent.TimeUnit;
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@State
public class ArrayCopy {