SlideShare uma empresa Scribd logo
1 de 23
1
Compiled	
  Python	
  UDFs	
  for	
  Impala	
  
Uri	
  Laserson	
  
20	
  May	
  2014	
  
Impala	
  User-­‐defined	
  FuncAons	
  (UDFs)	
  
•  Tuple	
  =>	
  Scalar	
  value	
  
•  Substring	
  
•  sin,	
  cos,	
  pow,	
  …	
  
•  Machine-­‐learning	
  models	
  
•  Supports	
  Hive	
  UDFs	
  (Java)	
  
•  RelaAvely	
  unpleasurable	
  
•  Slower	
  
•  Impala	
  (naAve)	
  UDFs	
  
•  C++	
  interface	
  designed	
  for	
  efficiency	
  
•  Similar	
  to	
  Postgres	
  UDFs	
  
•  Runs	
  any	
  LLVM-­‐compiled	
  code	
  
2
LLVM	
  compiler	
  infrastructure	
  
3
LLVM:	
  C++	
  example	
  
4
bool StringEq(FunctionContext* context,!
const StringVal& arg1,!
const StringVal& arg2) {!
if (arg1.is_null != arg2.is_null)!
return false;!
if (arg1.is_null)!
return true;!
if (arg1.len != arg2.len)!
return false;!
return (arg1.ptr == arg2.ptr) || !
memcmp(arg1.ptr, arg2.ptr, arg1.len) == 0;!
}!
LLVM:	
  IR	
  output	
  
5
; ModuleID = '<stdin>'!
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-
f80:128:128-n8:16:32:64-S128"!
target triple = "x86_64-apple-macosx10.7.0"!
!
%"class.impala_udf::FunctionContext" = type { %"class.impala::FunctionContextImpl"* }!
%"class.impala::FunctionContextImpl" = type opaque!
%"struct.impala_udf::StringVal" = type { %"struct.impala_udf::AnyVal", i32, i8* }!
%"struct.impala_udf::AnyVal" = type { i8 }!
!
; Function Attrs: nounwind readonly ssp uwtable!
define zeroext i1 @_Z8StringEqPN10impala_udf15FunctionContextERKNS_9StringValES4_(%"class.impala_udf::FunctionContext"* nocapture %context,
%"struct.impala_udf::StringVal"* nocapture %arg1, %"struct.impala_udf::StringVal"* nocapture %arg2) #0 {!
entry:!
%is_null = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg1, i64 0, i32 0, i32 0!
%0 = load i8* %is_null, align 1, !tbaa !0, !range !3!
%is_null1 = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg2, i64 0, i32 0, i32 0!
%1 = load i8* %is_null1, align 1, !tbaa !0, !range !3!
%cmp = icmp eq i8 %0, %1!
br i1 %cmp, label %if.end, label %return!
!
if.end: ; preds = %entry!
%tobool = icmp eq i8 %0, 0!
br i1 %tobool, label %if.end7, label %return!
!
if.end7: ; preds = %if.end!
%len = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg1, i64 0, i32 1!
%2 = load i32* %len, align 4, !tbaa !4!
%len8 = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg2, i64 0, i32 1!
%3 = load i32* %len8, align 4, !tbaa !4!
%cmp9 = icmp eq i32 %2, %3!
br i1 %cmp9, label %if.end11, label %return!
!
if.end11: ; preds = %if.end7!
%ptr = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg1, i64 0, i32 2!
%4 = load i8** %ptr, align 8, !tbaa !5!
%ptr12 = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg2, i64 0, i32 2!
%5 = load i8** %ptr12, align 8, !tbaa !5!
%cmp13 = icmp eq i8* %4, %5!
br i1 %cmp13, label %return, label %lor.rhs!
!
lor.rhs: ; preds = %if.end11!
%conv17 = sext i32 %2 to i64!
%call = tail call i32 @memcmp(i8* %4, i8* %5, i64 %conv17)!
%cmp18 = icmp eq i32 %call, 0!
br label %return!
!
return: ; preds = %lor.rhs, %if.end11, %if.end7, %if.end, %entry!
%retval.0 = phi i1 [ false, %entry ], [ true, %if.end ], [ false, %if.end7 ], [ true, %if.end11 ], [ %cmp18, %lor.rhs ]!
LLVM:	
  IR	
  output	
  
6
; ModuleID = '<stdin>'!
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-
f80:128:128-n8:16:32:64-S128"!
target triple = "x86_64-apple-macosx10.7.0"!
!
%"class.impala_udf::FunctionContext" = type { %"class.impala::FunctionContextImpl"* }!
%"class.impala::FunctionContextImpl" = type opaque!
%"struct.impala_udf::StringVal" = type { %"struct.impala_udf::AnyVal", i32, i8* }!
%"struct.impala_udf::AnyVal" = type { i8 }!
!
; Function Attrs: nounwind readonly ssp uwtable!
define zeroext i1 @_Z8StringEqPN10impala_udf15FunctionContextERKNS_9StringValES4_(%"class.impala_udf::FunctionContext"* nocapture %context,
%"struct.impala_udf::StringVal"* nocapture %arg1, %"struct.impala_udf::StringVal"* nocapture %arg2) #0 {!
entry:!
%is_null = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg1, i64 0, i32 0, i32 0!
%0 = load i8* %is_null, align 1, !tbaa !0, !range !3!
%is_null1 = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg2, i64 0, i32 0, i32 0!
%1 = load i8* %is_null1, align 1, !tbaa !0, !range !3!
%cmp = icmp eq i8 %0, %1!
br i1 %cmp, label %if.end, label %return!
!
if.end: ; preds = %entry!
%tobool = icmp eq i8 %0, 0!
br i1 %tobool, label %if.end7, label %return!
!
if.end7: ; preds = %if.end!
%len = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg1, i64 0, i32 1!
%2 = load i32* %len, align 4, !tbaa !4!
%len8 = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg2, i64 0, i32 1!
%3 = load i32* %len8, align 4, !tbaa !4!
%cmp9 = icmp eq i32 %2, %3!
br i1 %cmp9, label %if.end11, label %return!
!
if.end11: ; preds = %if.end7!
%ptr = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg1, i64 0, i32 2!
%4 = load i8** %ptr, align 8, !tbaa !5!
%ptr12 = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg2, i64 0, i32 2!
%5 = load i8** %ptr12, align 8, !tbaa !5!
%cmp13 = icmp eq i8* %4, %5!
br i1 %cmp13, label %return, label %lor.rhs!
!
lor.rhs: ; preds = %if.end11!
%conv17 = sext i32 %2 to i64!
%call = tail call i32 @memcmp(i8* %4, i8* %5, i64 %conv17)!
%cmp18 = icmp eq i32 %call, 0!
br label %return!
!
return: ; preds = %lor.rhs, %if.end11, %if.end7, %if.end, %entry!
%retval.0 = phi i1 [ false, %entry ], [ true, %if.end ], [ false, %if.end7 ], [ true, %if.end11 ], [ %cmp18, %lor.rhs ]!
Data	
  type	
  compaAbility	
  
7
struct AnyVal {!
bool is_null;!
};!
!
struct StringVal : public AnyVal {!
int len;!
uint8_t* ptr;!
};!
%AnyVal = type { i8 }!
%StringVal = type { %AnyVal, i32, i8* }!
!
; or!
!
%StringVal = type { { i8 }, i32, i8* }!
C++	
  LLVM	
  IR	
  
Register	
  and	
  execute	
  the	
  funcAon	
  
8
CREATE FUNCTION StringEq(STRING, STRING)!
RETURNS BOOLEAN!
LOCATION '/path/to/bitcode.ll’!
SYMBOL=’StringEq’;!
SELECT StringEq(a, b) FROM mytable;!
Numba	
  compiler	
  
9
NumbaPython
Impyla:	
  Python	
  Library	
  for	
  Impala	
  
•  pip	
  install	
  impyla	
  
•  DB	
  API	
  v2.0	
  (PEP	
  249)	
  compaAble	
  
•  Prototype	
  sklearn	
  API	
  for	
  Impala	
  ML	
  
•  Numba	
  integraAon	
  (described	
  here)	
  
•  See	
  blog	
  post:	
  h]p://blog.cloudera.com/blog/
2014/04/a-­‐new-­‐python-­‐client-­‐for-­‐impala/	
  
10
LLVM:	
  Python	
  example	
  
11
@udf(IntVal(FunctionContext, StringVal))
def hour_from_weird_date_format(context, date):!
return int(split(date, '-')[1])!
!
!
ship_udf(cursor, hour_from_weird_data_format,!
'/path/to/store/udf.ll', 'my.impala.host')!
!
!
cur.execute('SELECT hour_from_weird_data_format(date) ’ +!
‘AS hour FROM mytable LIMIT 100’)!
Model	
  Scoring:	
  BigML	
  on	
  Census	
  Data	
  
12
MLaaS	
  
Model	
  Scoring:	
  BigML	
  on	
  Census	
  Data	
  
13
Example:	
  100	
  Node	
  Decision	
  Tree	
  
14
def predict_income(impala_function_context, age, workclass, final_weight, education, education_num, marital_status, occupation, relationship,!
race, sex, hours_per_week, native_country, income):!
if (marital_status is None):!
return '<=50K'!
if (marital_status == 'Married-civ-spouse'):!
if (education_num is None):!
return '<=50K'!
if (education_num > 12):!
if (hours_per_week is None):!
return '>50K'!
if (hours_per_week > 31):!
if (age is None):!
return '>50K'!
if (age > 28):!
if (education_num > 13):!
if (age > 58):!
return '>50K'!
if (age <= 58):!
return '>50K'!
if (education_num <= 13):!
if (occupation is None):!
return '>50K'!
if (occupation == 'Exec-managerial'):!
return '>50K'!
if (occupation != 'Exec-managerial'):!
return '>50K'!
if (age <= 28):!
if (age > 24):!
if (occupation is None):!
return '<=50K'!
if (occupation == 'Tech-support'):!
return '>50K'!
if (occupation != 'Tech-support'):!
return '<=50K'!
if (age <= 24):!
if (final_weight is None):!
return '<=50K'!
if (final_weight > 492053):!
return '>50K'!
if (final_weight <= 492053):!
return '<=50K'!
if (hours_per_week <= 31):!
if (sex is None):!
return '<=50K'!
if (sex == 'Male'):!
if (age is None):!
return '<=50K'!
if (age > 29):!
if (age > 62):!
Batch	
  Scoring	
  with	
  PySpark	
  
15
# parse the text data!
observations = sc.textFile('/path/to/census_data').map(parse_obs)!
!
# perform batch scoring!
predictions = observations.map(lambda tup: predict_income(*tup))!
!
# trigger computation!
distinct = predictions.distinct().collect()!
!
Batch	
  Scoring	
  with	
  Impala	
  
16
# compile the scoring function!
predict_income = udf(signature)(predict_income)!
!
ship_udf(cursor, predict_income, ...)!
!
# perform batch scoring!
cursor.execute(‘SELECT DISTINCT predict_income(age, ... ) ‘ +!
‘FROM census_text’)!
distinct = cursor.fetchall()!
!
ExecuAon	
  Time	
  
17
execution_time =!
!
per_job_overhead +!
!
N * ( per_record_exec + memcmp_exec )!
PySpark	
  vs.	
  Impala	
  Performance	
  
18
Tree	
  size	
  
(nodes)	
  
Spark	
  
execu?on	
  
?me	
  (s)	
  
Impala	
  
execu?on	
  
?me	
  (s)	
  
Fold	
  
differenc
e	
  
Impala	
  
compila?
on	
  ?me	
  
(s)	
  
Bytecode	
  
size	
  
(bytes)	
  
Percent	
  
memcmp	
  
nodes	
  
0	
   160	
   9	
   17x	
   0	
   4	
  
100	
   175	
   22	
   8x	
   1	
   2254	
   22%	
  
500	
   178	
   27	
   7x	
   4	
   9803	
   35%	
  
1000	
   184	
   32	
   6x	
   16	
   23495	
   34%	
  
1500	
   188	
   35	
   5x	
   18	
   28301	
   34%	
  
2000	
   196	
   37	
   5x	
   31	
   42442	
   33%	
  
ExecuAon	
  Time	
  
19
execution_time =!
!
per_job_overhead +!
!
N * ( per_record_exec + memcmp_exec )!
Spark:	
  24	
  threads	
  /	
  node	
  
[	
   ]	
  
Impala:	
  1	
  thread	
  /	
  node	
  
PySpark	
  vs.	
  Impala	
  Performance	
  
20
Tree	
  size	
  
(nodes)	
  
Spark	
  
execu?on	
  
?me	
  (s)	
  
Impala	
  
execu?on	
  
?me	
  (s)	
  
Fold	
  
differenc
e	
  
Impala	
  
compila?
on	
  ?me	
  
(s)	
  
Bytecode	
  
size	
  
(bytes)	
  
Percent	
  
memcmp	
  
nodes	
  
0	
   160	
   9	
   17x	
   0	
   4	
  
100	
   175	
   22	
   8x	
   1	
   2254	
   22%	
  
500	
   178	
   27	
   7x	
   4	
   9803	
   35%	
  
1000	
   184	
   32	
   6x	
   16	
   23495	
   34%	
  
1500	
   188	
   35	
   5x	
   18	
   28301	
   34%	
  
2000	
   196	
   37	
   5x	
   31	
   42442	
   33%	
  
Current	
  Status	
  
•  Support	
  for	
  all	
  Impala	
  UDF	
  data	
  types	
  (e.g.,	
  IntVal,	
  
StringVal,	
  etc.)	
  
•  Support	
  for	
  casts	
  to/from	
  primiAve	
  types:	
  
•  Any	
  operaAons	
  on	
  primiAves	
  should	
  work	
  on	
  Impala	
  types	
  
•  Support	
  for	
  NULL	
  types	
  as	
  Python	
  None!
•  Proof-­‐of-­‐principle	
  support	
  for	
  Python	
  string	
  module	
  
•  len!
•  split!
•  ConcatenaAon	
  
•  Call	
  out	
  to	
  any	
  extern C	
  funcAons	
  
•  Proposed	
  direcAons	
  
•  Array	
  handling	
  
•  Numpy	
  support	
  
•  What	
  else?	
  
21
UDFs	
  with	
  Impala	
  +	
  Numba	
  
•  Simplicity	
  of	
  Python	
  interface/syntax	
  
•  Performance	
  of	
  compiled	
  language	
  like	
  C++	
  
•  Developed	
  at:	
  h]ps://github.com/cloudera/impyla	
  
•  Please	
  try	
  it	
  and	
  tell	
  us	
  what	
  features	
  would	
  be	
  useful	
  
•  Please	
  contribute!	
  
22
pip install impyla!
23

Mais conteúdo relacionado

Mais procurados

Static Optimization of PHP bytecode (PHPSC 2017)
Static Optimization of PHP bytecode (PHPSC 2017)Static Optimization of PHP bytecode (PHPSC 2017)
Static Optimization of PHP bytecode (PHPSC 2017)Nikita Popov
 
PHP Performance Trivia
PHP Performance TriviaPHP Performance Trivia
PHP Performance TriviaNikita Popov
 
Euro python2011 High Performance Python
Euro python2011 High Performance PythonEuro python2011 High Performance Python
Euro python2011 High Performance PythonIan Ozsvald
 
Evolutionary Testing for Crash Reproduction
Evolutionary Testing for Crash ReproductionEvolutionary Testing for Crash Reproduction
Evolutionary Testing for Crash ReproductionAnnibale Panichella
 
Sending a for ahuh. win32 exploit development old school
Sending a for ahuh. win32 exploit development old schoolSending a for ahuh. win32 exploit development old school
Sending a for ahuh. win32 exploit development old schoolNahidul Kibria
 
Opaque Pointers Are Coming
Opaque Pointers Are ComingOpaque Pointers Are Coming
Opaque Pointers Are ComingNikita Popov
 
A Lifecycle Of Code Under Test by Robert Fornal
A Lifecycle Of Code Under Test by Robert FornalA Lifecycle Of Code Under Test by Robert Fornal
A Lifecycle Of Code Under Test by Robert FornalQA or the Highway
 
Typed Properties and more: What's coming in PHP 7.4?
Typed Properties and more: What's coming in PHP 7.4?Typed Properties and more: What's coming in PHP 7.4?
Typed Properties and more: What's coming in PHP 7.4?Nikita Popov
 
PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021Ayesh Karunaratne
 
Building Interpreters with PyPy
Building Interpreters with PyPyBuilding Interpreters with PyPy
Building Interpreters with PyPyDaniel Neuhäuser
 
Swift: Apple's New Programming Language for iOS and OS X
Swift: Apple's New Programming Language for iOS and OS XSwift: Apple's New Programming Language for iOS and OS X
Swift: Apple's New Programming Language for iOS and OS XSasha Goldshtein
 
掀起 Swift 的面紗
掀起 Swift 的面紗掀起 Swift 的面紗
掀起 Swift 的面紗Pofat Tseng
 
F#语言对异步程序设计的支持
F#语言对异步程序设计的支持F#语言对异步程序设计的支持
F#语言对异步程序设计的支持jeffz
 
Lego: A brick system build by scala
Lego: A brick system build by scalaLego: A brick system build by scala
Lego: A brick system build by scalalunfu zhong
 
The core libraries you always wanted - Google Guava
The core libraries you always wanted - Google GuavaThe core libraries you always wanted - Google Guava
The core libraries you always wanted - Google GuavaMite Mitreski
 
An introduction to functional programming with go
An introduction to functional programming with goAn introduction to functional programming with go
An introduction to functional programming with goEleanor McHugh
 
Adding 1.21 Gigawatts to Applications with RabbitMQ (PHP Oxford June Meetup 2...
Adding 1.21 Gigawatts to Applications with RabbitMQ (PHP Oxford June Meetup 2...Adding 1.21 Gigawatts to Applications with RabbitMQ (PHP Oxford June Meetup 2...
Adding 1.21 Gigawatts to Applications with RabbitMQ (PHP Oxford June Meetup 2...James Titcumb
 

Mais procurados (20)

Static Optimization of PHP bytecode (PHPSC 2017)
Static Optimization of PHP bytecode (PHPSC 2017)Static Optimization of PHP bytecode (PHPSC 2017)
Static Optimization of PHP bytecode (PHPSC 2017)
 
PHP Performance Trivia
PHP Performance TriviaPHP Performance Trivia
PHP Performance Trivia
 
Euro python2011 High Performance Python
Euro python2011 High Performance PythonEuro python2011 High Performance Python
Euro python2011 High Performance Python
 
Evolutionary Testing for Crash Reproduction
Evolutionary Testing for Crash ReproductionEvolutionary Testing for Crash Reproduction
Evolutionary Testing for Crash Reproduction
 
Sending a for ahuh. win32 exploit development old school
Sending a for ahuh. win32 exploit development old schoolSending a for ahuh. win32 exploit development old school
Sending a for ahuh. win32 exploit development old school
 
Opaque Pointers Are Coming
Opaque Pointers Are ComingOpaque Pointers Are Coming
Opaque Pointers Are Coming
 
Short intro to ECMAScript
Short intro to ECMAScriptShort intro to ECMAScript
Short intro to ECMAScript
 
A Lifecycle Of Code Under Test by Robert Fornal
A Lifecycle Of Code Under Test by Robert FornalA Lifecycle Of Code Under Test by Robert Fornal
A Lifecycle Of Code Under Test by Robert Fornal
 
Typed Properties and more: What's coming in PHP 7.4?
Typed Properties and more: What's coming in PHP 7.4?Typed Properties and more: What's coming in PHP 7.4?
Typed Properties and more: What's coming in PHP 7.4?
 
PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021
 
Building Interpreters with PyPy
Building Interpreters with PyPyBuilding Interpreters with PyPy
Building Interpreters with PyPy
 
Swift: Apple's New Programming Language for iOS and OS X
Swift: Apple's New Programming Language for iOS and OS XSwift: Apple's New Programming Language for iOS and OS X
Swift: Apple's New Programming Language for iOS and OS X
 
掀起 Swift 的面紗
掀起 Swift 的面紗掀起 Swift 的面紗
掀起 Swift 的面紗
 
F#语言对异步程序设计的支持
F#语言对异步程序设计的支持F#语言对异步程序设计的支持
F#语言对异步程序设计的支持
 
Lego: A brick system build by scala
Lego: A brick system build by scalaLego: A brick system build by scala
Lego: A brick system build by scala
 
The core libraries you always wanted - Google Guava
The core libraries you always wanted - Google GuavaThe core libraries you always wanted - Google Guava
The core libraries you always wanted - Google Guava
 
Scala vs Ruby
Scala vs RubyScala vs Ruby
Scala vs Ruby
 
Next Level Testing Revisited
Next Level Testing RevisitedNext Level Testing Revisited
Next Level Testing Revisited
 
An introduction to functional programming with go
An introduction to functional programming with goAn introduction to functional programming with go
An introduction to functional programming with go
 
Adding 1.21 Gigawatts to Applications with RabbitMQ (PHP Oxford June Meetup 2...
Adding 1.21 Gigawatts to Applications with RabbitMQ (PHP Oxford June Meetup 2...Adding 1.21 Gigawatts to Applications with RabbitMQ (PHP Oxford June Meetup 2...
Adding 1.21 Gigawatts to Applications with RabbitMQ (PHP Oxford June Meetup 2...
 

Semelhante a Compiled Python UDFs for Impala

Learn You a Functional JavaScript for Great Good
Learn You a Functional JavaScript for Great GoodLearn You a Functional JavaScript for Great Good
Learn You a Functional JavaScript for Great GoodMike Harris
 
Software to the slaughter
Software to the slaughterSoftware to the slaughter
Software to the slaughterQuinn Wilton
 
JVMLS 2016. Coroutines in Kotlin
JVMLS 2016. Coroutines in KotlinJVMLS 2016. Coroutines in Kotlin
JVMLS 2016. Coroutines in KotlinAndrey Breslav
 
35787646 system-software-lab-manual
35787646 system-software-lab-manual35787646 system-software-lab-manual
35787646 system-software-lab-manualNaveen Kumar
 
Functional Reactive Programming / Compositional Event Systems
Functional Reactive Programming / Compositional Event SystemsFunctional Reactive Programming / Compositional Event Systems
Functional Reactive Programming / Compositional Event SystemsLeonardo Borges
 
RubyConf Portugal 2014 - Why ruby must go!
RubyConf Portugal 2014 - Why ruby must go!RubyConf Portugal 2014 - Why ruby must go!
RubyConf Portugal 2014 - Why ruby must go!Gautam Rege
 
Serializing EMF models with Xtext
Serializing EMF models with XtextSerializing EMF models with Xtext
Serializing EMF models with Xtextmeysholdt
 
"Why is there no artificial intelligence yet?" Or, analysis of CNTK tool kit ...
"Why is there no artificial intelligence yet?" Or, analysis of CNTK tool kit ..."Why is there no artificial intelligence yet?" Or, analysis of CNTK tool kit ...
"Why is there no artificial intelligence yet?" Or, analysis of CNTK tool kit ...PVS-Studio
 
How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016
How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016
How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016Codemotion
 
Introduction to reactive programming & ReactiveCocoa
Introduction to reactive programming & ReactiveCocoaIntroduction to reactive programming & ReactiveCocoa
Introduction to reactive programming & ReactiveCocoaFlorent Pillet
 
Go Containers
Go ContainersGo Containers
Go Containersjgrahamc
 
NetPonto - The Future Of C# - NetConf Edition
NetPonto - The Future Of C# - NetConf EditionNetPonto - The Future Of C# - NetConf Edition
NetPonto - The Future Of C# - NetConf EditionPaulo Morgado
 
Turn your spaghetti code into ravioli with JavaScript modules
Turn your spaghetti code into ravioli with JavaScript modulesTurn your spaghetti code into ravioli with JavaScript modules
Turn your spaghetti code into ravioli with JavaScript modulesjerryorr
 
Go Concurrency
Go ConcurrencyGo Concurrency
Go Concurrencyjgrahamc
 
[FT-11][suhorng] “Poor Man's” Undergraduate Compilers
[FT-11][suhorng] “Poor Man's” Undergraduate Compilers[FT-11][suhorng] “Poor Man's” Undergraduate Compilers
[FT-11][suhorng] “Poor Man's” Undergraduate CompilersFunctional Thursday
 
Compiler2016 by abcdabcd987
Compiler2016 by abcdabcd987Compiler2016 by abcdabcd987
Compiler2016 by abcdabcd987乐群 陈
 

Semelhante a Compiled Python UDFs for Impala (20)

Learn You a Functional JavaScript for Great Good
Learn You a Functional JavaScript for Great GoodLearn You a Functional JavaScript for Great Good
Learn You a Functional JavaScript for Great Good
 
Quick swift tour
Quick swift tourQuick swift tour
Quick swift tour
 
Software to the slaughter
Software to the slaughterSoftware to the slaughter
Software to the slaughter
 
JVMLS 2016. Coroutines in Kotlin
JVMLS 2016. Coroutines in KotlinJVMLS 2016. Coroutines in Kotlin
JVMLS 2016. Coroutines in Kotlin
 
35787646 system-software-lab-manual
35787646 system-software-lab-manual35787646 system-software-lab-manual
35787646 system-software-lab-manual
 
Functional Reactive Programming / Compositional Event Systems
Functional Reactive Programming / Compositional Event SystemsFunctional Reactive Programming / Compositional Event Systems
Functional Reactive Programming / Compositional Event Systems
 
RubyConf Portugal 2014 - Why ruby must go!
RubyConf Portugal 2014 - Why ruby must go!RubyConf Portugal 2014 - Why ruby must go!
RubyConf Portugal 2014 - Why ruby must go!
 
Serializing EMF models with Xtext
Serializing EMF models with XtextSerializing EMF models with Xtext
Serializing EMF models with Xtext
 
"Why is there no artificial intelligence yet?" Or, analysis of CNTK tool kit ...
"Why is there no artificial intelligence yet?" Or, analysis of CNTK tool kit ..."Why is there no artificial intelligence yet?" Or, analysis of CNTK tool kit ...
"Why is there no artificial intelligence yet?" Or, analysis of CNTK tool kit ...
 
How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016
How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016
How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016
 
Introduction to reactive programming & ReactiveCocoa
Introduction to reactive programming & ReactiveCocoaIntroduction to reactive programming & ReactiveCocoa
Introduction to reactive programming & ReactiveCocoa
 
Go Containers
Go ContainersGo Containers
Go Containers
 
Go Containers
Go ContainersGo Containers
Go Containers
 
Buffer OverFlow
Buffer OverFlowBuffer OverFlow
Buffer OverFlow
 
NetPonto - The Future Of C# - NetConf Edition
NetPonto - The Future Of C# - NetConf EditionNetPonto - The Future Of C# - NetConf Edition
NetPonto - The Future Of C# - NetConf Edition
 
Turn your spaghetti code into ravioli with JavaScript modules
Turn your spaghetti code into ravioli with JavaScript modulesTurn your spaghetti code into ravioli with JavaScript modules
Turn your spaghetti code into ravioli with JavaScript modules
 
Go Concurrency
Go ConcurrencyGo Concurrency
Go Concurrency
 
[FT-11][suhorng] “Poor Man's” Undergraduate Compilers
[FT-11][suhorng] “Poor Man's” Undergraduate Compilers[FT-11][suhorng] “Poor Man's” Undergraduate Compilers
[FT-11][suhorng] “Poor Man's” Undergraduate Compilers
 
Es.next
Es.nextEs.next
Es.next
 
Compiler2016 by abcdabcd987
Compiler2016 by abcdabcd987Compiler2016 by abcdabcd987
Compiler2016 by abcdabcd987
 

Mais de Cloudera, Inc.

Partner Briefing_January 25 (FINAL).pptx
Partner Briefing_January 25 (FINAL).pptxPartner Briefing_January 25 (FINAL).pptx
Partner Briefing_January 25 (FINAL).pptxCloudera, Inc.
 
Cloudera Data Impact Awards 2021 - Finalists
Cloudera Data Impact Awards 2021 - Finalists Cloudera Data Impact Awards 2021 - Finalists
Cloudera Data Impact Awards 2021 - Finalists Cloudera, Inc.
 
2020 Cloudera Data Impact Awards Finalists
2020 Cloudera Data Impact Awards Finalists2020 Cloudera Data Impact Awards Finalists
2020 Cloudera Data Impact Awards FinalistsCloudera, Inc.
 
Edc event vienna presentation 1 oct 2019
Edc event vienna presentation 1 oct 2019Edc event vienna presentation 1 oct 2019
Edc event vienna presentation 1 oct 2019Cloudera, Inc.
 
Machine Learning with Limited Labeled Data 4/3/19
Machine Learning with Limited Labeled Data 4/3/19Machine Learning with Limited Labeled Data 4/3/19
Machine Learning with Limited Labeled Data 4/3/19Cloudera, Inc.
 
Data Driven With the Cloudera Modern Data Warehouse 3.19.19
Data Driven With the Cloudera Modern Data Warehouse 3.19.19Data Driven With the Cloudera Modern Data Warehouse 3.19.19
Data Driven With the Cloudera Modern Data Warehouse 3.19.19Cloudera, Inc.
 
Introducing Cloudera DataFlow (CDF) 2.13.19
Introducing Cloudera DataFlow (CDF) 2.13.19Introducing Cloudera DataFlow (CDF) 2.13.19
Introducing Cloudera DataFlow (CDF) 2.13.19Cloudera, Inc.
 
Introducing Cloudera Data Science Workbench for HDP 2.12.19
Introducing Cloudera Data Science Workbench for HDP 2.12.19Introducing Cloudera Data Science Workbench for HDP 2.12.19
Introducing Cloudera Data Science Workbench for HDP 2.12.19Cloudera, Inc.
 
Shortening the Sales Cycle with a Modern Data Warehouse 1.30.19
Shortening the Sales Cycle with a Modern Data Warehouse 1.30.19Shortening the Sales Cycle with a Modern Data Warehouse 1.30.19
Shortening the Sales Cycle with a Modern Data Warehouse 1.30.19Cloudera, Inc.
 
Leveraging the cloud for analytics and machine learning 1.29.19
Leveraging the cloud for analytics and machine learning 1.29.19Leveraging the cloud for analytics and machine learning 1.29.19
Leveraging the cloud for analytics and machine learning 1.29.19Cloudera, Inc.
 
Modernizing the Legacy Data Warehouse – What, Why, and How 1.23.19
Modernizing the Legacy Data Warehouse – What, Why, and How 1.23.19Modernizing the Legacy Data Warehouse – What, Why, and How 1.23.19
Modernizing the Legacy Data Warehouse – What, Why, and How 1.23.19Cloudera, Inc.
 
Leveraging the Cloud for Big Data Analytics 12.11.18
Leveraging the Cloud for Big Data Analytics 12.11.18Leveraging the Cloud for Big Data Analytics 12.11.18
Leveraging the Cloud for Big Data Analytics 12.11.18Cloudera, Inc.
 
Modern Data Warehouse Fundamentals Part 3
Modern Data Warehouse Fundamentals Part 3Modern Data Warehouse Fundamentals Part 3
Modern Data Warehouse Fundamentals Part 3Cloudera, Inc.
 
Modern Data Warehouse Fundamentals Part 2
Modern Data Warehouse Fundamentals Part 2Modern Data Warehouse Fundamentals Part 2
Modern Data Warehouse Fundamentals Part 2Cloudera, Inc.
 
Modern Data Warehouse Fundamentals Part 1
Modern Data Warehouse Fundamentals Part 1Modern Data Warehouse Fundamentals Part 1
Modern Data Warehouse Fundamentals Part 1Cloudera, Inc.
 
Extending Cloudera SDX beyond the Platform
Extending Cloudera SDX beyond the PlatformExtending Cloudera SDX beyond the Platform
Extending Cloudera SDX beyond the PlatformCloudera, Inc.
 
Federated Learning: ML with Privacy on the Edge 11.15.18
Federated Learning: ML with Privacy on the Edge 11.15.18Federated Learning: ML with Privacy on the Edge 11.15.18
Federated Learning: ML with Privacy on the Edge 11.15.18Cloudera, Inc.
 
Analyst Webinar: Doing a 180 on Customer 360
Analyst Webinar: Doing a 180 on Customer 360Analyst Webinar: Doing a 180 on Customer 360
Analyst Webinar: Doing a 180 on Customer 360Cloudera, Inc.
 
Build a modern platform for anti-money laundering 9.19.18
Build a modern platform for anti-money laundering 9.19.18Build a modern platform for anti-money laundering 9.19.18
Build a modern platform for anti-money laundering 9.19.18Cloudera, Inc.
 
Introducing the data science sandbox as a service 8.30.18
Introducing the data science sandbox as a service 8.30.18Introducing the data science sandbox as a service 8.30.18
Introducing the data science sandbox as a service 8.30.18Cloudera, Inc.
 

Mais de Cloudera, Inc. (20)

Partner Briefing_January 25 (FINAL).pptx
Partner Briefing_January 25 (FINAL).pptxPartner Briefing_January 25 (FINAL).pptx
Partner Briefing_January 25 (FINAL).pptx
 
Cloudera Data Impact Awards 2021 - Finalists
Cloudera Data Impact Awards 2021 - Finalists Cloudera Data Impact Awards 2021 - Finalists
Cloudera Data Impact Awards 2021 - Finalists
 
2020 Cloudera Data Impact Awards Finalists
2020 Cloudera Data Impact Awards Finalists2020 Cloudera Data Impact Awards Finalists
2020 Cloudera Data Impact Awards Finalists
 
Edc event vienna presentation 1 oct 2019
Edc event vienna presentation 1 oct 2019Edc event vienna presentation 1 oct 2019
Edc event vienna presentation 1 oct 2019
 
Machine Learning with Limited Labeled Data 4/3/19
Machine Learning with Limited Labeled Data 4/3/19Machine Learning with Limited Labeled Data 4/3/19
Machine Learning with Limited Labeled Data 4/3/19
 
Data Driven With the Cloudera Modern Data Warehouse 3.19.19
Data Driven With the Cloudera Modern Data Warehouse 3.19.19Data Driven With the Cloudera Modern Data Warehouse 3.19.19
Data Driven With the Cloudera Modern Data Warehouse 3.19.19
 
Introducing Cloudera DataFlow (CDF) 2.13.19
Introducing Cloudera DataFlow (CDF) 2.13.19Introducing Cloudera DataFlow (CDF) 2.13.19
Introducing Cloudera DataFlow (CDF) 2.13.19
 
Introducing Cloudera Data Science Workbench for HDP 2.12.19
Introducing Cloudera Data Science Workbench for HDP 2.12.19Introducing Cloudera Data Science Workbench for HDP 2.12.19
Introducing Cloudera Data Science Workbench for HDP 2.12.19
 
Shortening the Sales Cycle with a Modern Data Warehouse 1.30.19
Shortening the Sales Cycle with a Modern Data Warehouse 1.30.19Shortening the Sales Cycle with a Modern Data Warehouse 1.30.19
Shortening the Sales Cycle with a Modern Data Warehouse 1.30.19
 
Leveraging the cloud for analytics and machine learning 1.29.19
Leveraging the cloud for analytics and machine learning 1.29.19Leveraging the cloud for analytics and machine learning 1.29.19
Leveraging the cloud for analytics and machine learning 1.29.19
 
Modernizing the Legacy Data Warehouse – What, Why, and How 1.23.19
Modernizing the Legacy Data Warehouse – What, Why, and How 1.23.19Modernizing the Legacy Data Warehouse – What, Why, and How 1.23.19
Modernizing the Legacy Data Warehouse – What, Why, and How 1.23.19
 
Leveraging the Cloud for Big Data Analytics 12.11.18
Leveraging the Cloud for Big Data Analytics 12.11.18Leveraging the Cloud for Big Data Analytics 12.11.18
Leveraging the Cloud for Big Data Analytics 12.11.18
 
Modern Data Warehouse Fundamentals Part 3
Modern Data Warehouse Fundamentals Part 3Modern Data Warehouse Fundamentals Part 3
Modern Data Warehouse Fundamentals Part 3
 
Modern Data Warehouse Fundamentals Part 2
Modern Data Warehouse Fundamentals Part 2Modern Data Warehouse Fundamentals Part 2
Modern Data Warehouse Fundamentals Part 2
 
Modern Data Warehouse Fundamentals Part 1
Modern Data Warehouse Fundamentals Part 1Modern Data Warehouse Fundamentals Part 1
Modern Data Warehouse Fundamentals Part 1
 
Extending Cloudera SDX beyond the Platform
Extending Cloudera SDX beyond the PlatformExtending Cloudera SDX beyond the Platform
Extending Cloudera SDX beyond the Platform
 
Federated Learning: ML with Privacy on the Edge 11.15.18
Federated Learning: ML with Privacy on the Edge 11.15.18Federated Learning: ML with Privacy on the Edge 11.15.18
Federated Learning: ML with Privacy on the Edge 11.15.18
 
Analyst Webinar: Doing a 180 on Customer 360
Analyst Webinar: Doing a 180 on Customer 360Analyst Webinar: Doing a 180 on Customer 360
Analyst Webinar: Doing a 180 on Customer 360
 
Build a modern platform for anti-money laundering 9.19.18
Build a modern platform for anti-money laundering 9.19.18Build a modern platform for anti-money laundering 9.19.18
Build a modern platform for anti-money laundering 9.19.18
 
Introducing the data science sandbox as a service 8.30.18
Introducing the data science sandbox as a service 8.30.18Introducing the data science sandbox as a service 8.30.18
Introducing the data science sandbox as a service 8.30.18
 

Último

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 

Último (20)

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 

Compiled Python UDFs for Impala

  • 1. 1 Compiled  Python  UDFs  for  Impala   Uri  Laserson   20  May  2014  
  • 2. Impala  User-­‐defined  FuncAons  (UDFs)   •  Tuple  =>  Scalar  value   •  Substring   •  sin,  cos,  pow,  …   •  Machine-­‐learning  models   •  Supports  Hive  UDFs  (Java)   •  RelaAvely  unpleasurable   •  Slower   •  Impala  (naAve)  UDFs   •  C++  interface  designed  for  efficiency   •  Similar  to  Postgres  UDFs   •  Runs  any  LLVM-­‐compiled  code   2
  • 4. LLVM:  C++  example   4 bool StringEq(FunctionContext* context,! const StringVal& arg1,! const StringVal& arg2) {! if (arg1.is_null != arg2.is_null)! return false;! if (arg1.is_null)! return true;! if (arg1.len != arg2.len)! return false;! return (arg1.ptr == arg2.ptr) || ! memcmp(arg1.ptr, arg2.ptr, arg1.len) == 0;! }!
  • 5. LLVM:  IR  output   5 ; ModuleID = '<stdin>'! target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64- f80:128:128-n8:16:32:64-S128"! target triple = "x86_64-apple-macosx10.7.0"! ! %"class.impala_udf::FunctionContext" = type { %"class.impala::FunctionContextImpl"* }! %"class.impala::FunctionContextImpl" = type opaque! %"struct.impala_udf::StringVal" = type { %"struct.impala_udf::AnyVal", i32, i8* }! %"struct.impala_udf::AnyVal" = type { i8 }! ! ; Function Attrs: nounwind readonly ssp uwtable! define zeroext i1 @_Z8StringEqPN10impala_udf15FunctionContextERKNS_9StringValES4_(%"class.impala_udf::FunctionContext"* nocapture %context, %"struct.impala_udf::StringVal"* nocapture %arg1, %"struct.impala_udf::StringVal"* nocapture %arg2) #0 {! entry:! %is_null = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg1, i64 0, i32 0, i32 0! %0 = load i8* %is_null, align 1, !tbaa !0, !range !3! %is_null1 = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg2, i64 0, i32 0, i32 0! %1 = load i8* %is_null1, align 1, !tbaa !0, !range !3! %cmp = icmp eq i8 %0, %1! br i1 %cmp, label %if.end, label %return! ! if.end: ; preds = %entry! %tobool = icmp eq i8 %0, 0! br i1 %tobool, label %if.end7, label %return! ! if.end7: ; preds = %if.end! %len = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg1, i64 0, i32 1! %2 = load i32* %len, align 4, !tbaa !4! %len8 = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg2, i64 0, i32 1! %3 = load i32* %len8, align 4, !tbaa !4! %cmp9 = icmp eq i32 %2, %3! br i1 %cmp9, label %if.end11, label %return! ! if.end11: ; preds = %if.end7! %ptr = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg1, i64 0, i32 2! %4 = load i8** %ptr, align 8, !tbaa !5! %ptr12 = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg2, i64 0, i32 2! %5 = load i8** %ptr12, align 8, !tbaa !5! %cmp13 = icmp eq i8* %4, %5! br i1 %cmp13, label %return, label %lor.rhs! ! lor.rhs: ; preds = %if.end11! %conv17 = sext i32 %2 to i64! %call = tail call i32 @memcmp(i8* %4, i8* %5, i64 %conv17)! %cmp18 = icmp eq i32 %call, 0! br label %return! ! return: ; preds = %lor.rhs, %if.end11, %if.end7, %if.end, %entry! %retval.0 = phi i1 [ false, %entry ], [ true, %if.end ], [ false, %if.end7 ], [ true, %if.end11 ], [ %cmp18, %lor.rhs ]!
  • 6. LLVM:  IR  output   6 ; ModuleID = '<stdin>'! target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64- f80:128:128-n8:16:32:64-S128"! target triple = "x86_64-apple-macosx10.7.0"! ! %"class.impala_udf::FunctionContext" = type { %"class.impala::FunctionContextImpl"* }! %"class.impala::FunctionContextImpl" = type opaque! %"struct.impala_udf::StringVal" = type { %"struct.impala_udf::AnyVal", i32, i8* }! %"struct.impala_udf::AnyVal" = type { i8 }! ! ; Function Attrs: nounwind readonly ssp uwtable! define zeroext i1 @_Z8StringEqPN10impala_udf15FunctionContextERKNS_9StringValES4_(%"class.impala_udf::FunctionContext"* nocapture %context, %"struct.impala_udf::StringVal"* nocapture %arg1, %"struct.impala_udf::StringVal"* nocapture %arg2) #0 {! entry:! %is_null = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg1, i64 0, i32 0, i32 0! %0 = load i8* %is_null, align 1, !tbaa !0, !range !3! %is_null1 = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg2, i64 0, i32 0, i32 0! %1 = load i8* %is_null1, align 1, !tbaa !0, !range !3! %cmp = icmp eq i8 %0, %1! br i1 %cmp, label %if.end, label %return! ! if.end: ; preds = %entry! %tobool = icmp eq i8 %0, 0! br i1 %tobool, label %if.end7, label %return! ! if.end7: ; preds = %if.end! %len = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg1, i64 0, i32 1! %2 = load i32* %len, align 4, !tbaa !4! %len8 = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg2, i64 0, i32 1! %3 = load i32* %len8, align 4, !tbaa !4! %cmp9 = icmp eq i32 %2, %3! br i1 %cmp9, label %if.end11, label %return! ! if.end11: ; preds = %if.end7! %ptr = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg1, i64 0, i32 2! %4 = load i8** %ptr, align 8, !tbaa !5! %ptr12 = getelementptr inbounds %"struct.impala_udf::StringVal"* %arg2, i64 0, i32 2! %5 = load i8** %ptr12, align 8, !tbaa !5! %cmp13 = icmp eq i8* %4, %5! br i1 %cmp13, label %return, label %lor.rhs! ! lor.rhs: ; preds = %if.end11! %conv17 = sext i32 %2 to i64! %call = tail call i32 @memcmp(i8* %4, i8* %5, i64 %conv17)! %cmp18 = icmp eq i32 %call, 0! br label %return! ! return: ; preds = %lor.rhs, %if.end11, %if.end7, %if.end, %entry! %retval.0 = phi i1 [ false, %entry ], [ true, %if.end ], [ false, %if.end7 ], [ true, %if.end11 ], [ %cmp18, %lor.rhs ]!
  • 7. Data  type  compaAbility   7 struct AnyVal {! bool is_null;! };! ! struct StringVal : public AnyVal {! int len;! uint8_t* ptr;! };! %AnyVal = type { i8 }! %StringVal = type { %AnyVal, i32, i8* }! ! ; or! ! %StringVal = type { { i8 }, i32, i8* }! C++  LLVM  IR  
  • 8. Register  and  execute  the  funcAon   8 CREATE FUNCTION StringEq(STRING, STRING)! RETURNS BOOLEAN! LOCATION '/path/to/bitcode.ll’! SYMBOL=’StringEq’;! SELECT StringEq(a, b) FROM mytable;!
  • 10. Impyla:  Python  Library  for  Impala   •  pip  install  impyla   •  DB  API  v2.0  (PEP  249)  compaAble   •  Prototype  sklearn  API  for  Impala  ML   •  Numba  integraAon  (described  here)   •  See  blog  post:  h]p://blog.cloudera.com/blog/ 2014/04/a-­‐new-­‐python-­‐client-­‐for-­‐impala/   10
  • 11. LLVM:  Python  example   11 @udf(IntVal(FunctionContext, StringVal)) def hour_from_weird_date_format(context, date):! return int(split(date, '-')[1])! ! ! ship_udf(cursor, hour_from_weird_data_format,! '/path/to/store/udf.ll', 'my.impala.host')! ! ! cur.execute('SELECT hour_from_weird_data_format(date) ’ +! ‘AS hour FROM mytable LIMIT 100’)!
  • 12. Model  Scoring:  BigML  on  Census  Data   12 MLaaS  
  • 13. Model  Scoring:  BigML  on  Census  Data   13
  • 14. Example:  100  Node  Decision  Tree   14 def predict_income(impala_function_context, age, workclass, final_weight, education, education_num, marital_status, occupation, relationship,! race, sex, hours_per_week, native_country, income):! if (marital_status is None):! return '<=50K'! if (marital_status == 'Married-civ-spouse'):! if (education_num is None):! return '<=50K'! if (education_num > 12):! if (hours_per_week is None):! return '>50K'! if (hours_per_week > 31):! if (age is None):! return '>50K'! if (age > 28):! if (education_num > 13):! if (age > 58):! return '>50K'! if (age <= 58):! return '>50K'! if (education_num <= 13):! if (occupation is None):! return '>50K'! if (occupation == 'Exec-managerial'):! return '>50K'! if (occupation != 'Exec-managerial'):! return '>50K'! if (age <= 28):! if (age > 24):! if (occupation is None):! return '<=50K'! if (occupation == 'Tech-support'):! return '>50K'! if (occupation != 'Tech-support'):! return '<=50K'! if (age <= 24):! if (final_weight is None):! return '<=50K'! if (final_weight > 492053):! return '>50K'! if (final_weight <= 492053):! return '<=50K'! if (hours_per_week <= 31):! if (sex is None):! return '<=50K'! if (sex == 'Male'):! if (age is None):! return '<=50K'! if (age > 29):! if (age > 62):!
  • 15. Batch  Scoring  with  PySpark   15 # parse the text data! observations = sc.textFile('/path/to/census_data').map(parse_obs)! ! # perform batch scoring! predictions = observations.map(lambda tup: predict_income(*tup))! ! # trigger computation! distinct = predictions.distinct().collect()! !
  • 16. Batch  Scoring  with  Impala   16 # compile the scoring function! predict_income = udf(signature)(predict_income)! ! ship_udf(cursor, predict_income, ...)! ! # perform batch scoring! cursor.execute(‘SELECT DISTINCT predict_income(age, ... ) ‘ +! ‘FROM census_text’)! distinct = cursor.fetchall()! !
  • 17. ExecuAon  Time   17 execution_time =! ! per_job_overhead +! ! N * ( per_record_exec + memcmp_exec )!
  • 18. PySpark  vs.  Impala  Performance   18 Tree  size   (nodes)   Spark   execu?on   ?me  (s)   Impala   execu?on   ?me  (s)   Fold   differenc e   Impala   compila? on  ?me   (s)   Bytecode   size   (bytes)   Percent   memcmp   nodes   0   160   9   17x   0   4   100   175   22   8x   1   2254   22%   500   178   27   7x   4   9803   35%   1000   184   32   6x   16   23495   34%   1500   188   35   5x   18   28301   34%   2000   196   37   5x   31   42442   33%  
  • 19. ExecuAon  Time   19 execution_time =! ! per_job_overhead +! ! N * ( per_record_exec + memcmp_exec )! Spark:  24  threads  /  node   [   ]   Impala:  1  thread  /  node  
  • 20. PySpark  vs.  Impala  Performance   20 Tree  size   (nodes)   Spark   execu?on   ?me  (s)   Impala   execu?on   ?me  (s)   Fold   differenc e   Impala   compila? on  ?me   (s)   Bytecode   size   (bytes)   Percent   memcmp   nodes   0   160   9   17x   0   4   100   175   22   8x   1   2254   22%   500   178   27   7x   4   9803   35%   1000   184   32   6x   16   23495   34%   1500   188   35   5x   18   28301   34%   2000   196   37   5x   31   42442   33%  
  • 21. Current  Status   •  Support  for  all  Impala  UDF  data  types  (e.g.,  IntVal,   StringVal,  etc.)   •  Support  for  casts  to/from  primiAve  types:   •  Any  operaAons  on  primiAves  should  work  on  Impala  types   •  Support  for  NULL  types  as  Python  None! •  Proof-­‐of-­‐principle  support  for  Python  string  module   •  len! •  split! •  ConcatenaAon   •  Call  out  to  any  extern C  funcAons   •  Proposed  direcAons   •  Array  handling   •  Numpy  support   •  What  else?   21
  • 22. UDFs  with  Impala  +  Numba   •  Simplicity  of  Python  interface/syntax   •  Performance  of  compiled  language  like  C++   •  Developed  at:  h]ps://github.com/cloudera/impyla   •  Please  try  it  and  tell  us  what  features  would  be  useful   •  Please  contribute!   22 pip install impyla!
  • 23. 23