Skip to content

Instantly share code, notes, and snippets.

@acnithin
acnithin / spark
Last active May 15, 2016 16:39
spark -operations
https://0x0fff.com/spark-architecture-shuffle/
shuffle.unsafe.fastMergeEnabled
https://www.youtube.com/watch?v=WyfHUNnMutg
http://www.slideshare.net/cloudera/top-5-mistakes-to-avoid-when-writing-apache-spark-applications
http://www.slideshare.net/cfregly/advanced-apache-spark-meetup-spark-sql-dataframes-catalyst-optimizer-data-sources-api
spark.sql.tungsten.enabled=true
// This bit is important. It detects/adds XMLHttpRequest.sendAsBinary. Without this
// you cannot send image data as part of a multipart/form-data encoded request from
// Javascript. This implementation depends on Uint8Array, so if the browser doesn't
// support either XMLHttpRequest.sendAsBinary or Uint8Array, then you will need to
// find yet another way to implement this. (This is left as an exercise for the reader,
// but if you do it, please let me know and I'll integrate it.)
// from: http://stackoverflow.com/a/5303242/945521
if ( XMLHttpRequest.prototype.sendAsBinary === undefined ) {
@acnithin
acnithin / gist:3427117
Created August 22, 2012 16:15
BO Java SDK-purging report data
import com.crystaldecisions.sdk.framework.*
import="com.crystaldecisions.sdk.exception.SDKException
import="com.crystaldecisions.sdk.occa.infostore.*
import com.businessobjects.rebean.wi.*
boolean loginSuccessful = false;
IEnterpriseSession oEnterpriseSession = null;
String username = "Administrator";
String password = "MyPassword";
@acnithin
acnithin / gist:3427017
Created August 22, 2012 16:02
BO Java SDK-Getting SQL of WEBI SQl
<%
/*
* Applies to Version: Business Objects Enterprise XI Release 3.1
* Date Created : March 8, 2012
* Description : This page is displays each of the queries used in a
* WebI report.
* Author : BDB
*/
%>
@acnithin
acnithin / get universe connection
Created August 22, 2012 15:50
BO Java SDK-Getting Universe Connection
boInfoObjects = boInfoStore.query("SELECT TOP 1 * FROM CI_APPOBJECTS WHERE SI_NAME= '"+"DATACONNNAME"+"'")
boInfoObject = (IInfoObject)boInfoObjects.get(0);
IDataConnection idataconnection = (IDataConnection)boInfoObject;
@acnithin
acnithin / set universe connection.txt
Created August 22, 2012 15:49
BO Java SDK-Setting Universe Connection
com.crystaldecisions.sdk.occa.pluginmgr.IPluginInfo iplugininfo = ipluginmgr.getPluginInfo("MetaData.DataConnection");
boInfoObjects = boInfoStore.newInfoObjectCollection();
boInfoObjects.add(iplugininfo);
boInfoObject = (IInfoObject)boInfoObjects.get(0);
boInfoObject.setTitle(CONNECTIONTITLE);
IDataConnection idataconnection = (IDataConnection)boInfoObject;
idataconnection.setDescription(CONNECTIONDESCRIPTION);
idataconnection.setParentID(DATACONNECTIONPARENTFOLDERID);
idataconnection.setUVRdmsName("Generic ODBC datasource");