Comments (2)
from hadoop-pcap.
Tested and confirmed workaround in spark-shell.
scala> sqlContext.sql("CREATE EXTERNAL TABLE ora_pcap_sec (id bigint, ts_usec double, src string, src_port int, dst string, dst_port int, tns_auth_user string, tns_aut_app_user string, tns_auth_passwd string, tns_auth_terminal string, tns_auth_program_nm string, tns_auth_machine string) ROW FORMAT SERDE 'net.ripe.hadoop.pcap.serde.PcapDeserializer' WITH SERDEPROPERTIES('serialization.encoding'='SJIS') STORED AS INPUTFORMAT 'net.ripe.hadoop.pcap.mr1.io.PcapInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' LOCATION 'hdfs:///user/cloudera/pcap/data/'")
res6: org.apache.spark.sql.DataFrame = [result: string]
scala> val result2 = sqlContext.sql("select * from ora_pcap_sec")
result2: org.apache.spark.sql.DataFrame = [id: bigint, ts_usec: double, src: string, src_port: int, dst: string, dst_port: int, tns_auth_user: string, tns_aut_app_user: string, tns_auth_passwd: string, tns_auth_terminal: string, tns_auth_program_nm: string, tns_auth_machine: string]
scala> result2.count()
res7: Long = 21231
scala> result2.take(1)
res9: Array[org.apache.spark.sql.Row] = Array([58971,1.495641717739781E9,10.0.2.15,22,10.0.2.2,50302,null,null,null,null,null,null])
from hadoop-pcap.
Related Issues (20)
- New fields addition HOT 2
- Re-compile to include HiveDecimal HOT 2
- headerKeys in HttpPcapReader not initialize properly HOT 1
- java.lang.RuntimeException: java.lang.RuntimeException: class net.ripe.hadoop.pcap.DnsPcapReader not net.ripe.hadoop.pcap.PcapReader HOT 3
- parsed pcaket with NULL source and destination HOT 3
- "Not a PCAP file" error HOT 2
- Fragment ordering
- Ignore malformed packets HOT 1
- Re-assembly for out-of-order packets HOT 1
- Not able to extract packet payload data HOT 9
- new MapReduce API support would be nice HOT 4
- NullPointerException at "NewTrackingRecordReader.initialize(MapTask.java:548)"
- No Module in PySpark HOT 4
- get URL in HTTP_HEADERS
- Porting code to spark 2.0 HOT 4
- Releasing 1.2 in Maven repository?
- The method close() of type PcapRecordReader must override a superclass method
- How To Run Hadoop PCAP File In Eclipse
- how to read incoming network traffic information through hadoop pcap lib and hadoop pacp serde libraries HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hadoop-pcap.