Posts

Showing posts with the label hadoop

Java How to serialize any data into ORC format

Image
Clash Royale CLAN TAG #URR8PPP Java How to serialize any data into ORC format I am able to successfully convert any CSV file into ORC with the help of vectorized row batch. But as per the new requirement, I have to serialize any type of input data into ORC format. The data type of the input data is dynamic. It can be of any type. I have to serialize the input data(which is of any type, say CSV, Avro, etc,..) to byte array which can then be written into ORC file later. I have been unsuccessful to find anything that helps this requirement. Please show some light on how I should approach and what and all I can try to achieve this. Is there any in-built support for this in org.apache.orc By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

How do I increase the upload size using WebHDFS (Cloudera)?

Image
Clash Royale CLAN TAG #URR8PPP How do I increase the upload size using WebHDFS (Cloudera)? I'm attempting to create an ~80mb file in Hadoop using WebHDFS with op=CREATE. This works fine for small files, but with the 80mb files I get an exception with: Form too large9000000>20000 I realize I could probably chunk this, but 20k seems like a pretty tiny chunk. Is there a way I configure Hadoop, Cloudera specifically, to allow me to upload larger chunks and files? Thanks! By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Save Spark dataframe as dynamic partitioned table in Hive

Image
Clash Royale CLAN TAG #URR8PPP Save Spark dataframe as dynamic partitioned table in Hive I have a sample application working to read from csv files into a dataframe. The dataframe can be stored to a Hive table in parquet format using the method df.saveAsTable(tablename,mode) . df.saveAsTable(tablename,mode) The above code works fine, but I have so much data for each day that i want to dynamic partition the hive table based on the creationdate(column in the table). is there any way to dynamic partition the dataframe and store it to hive warehouse. Want to refrain from Hard-coding the insert statement using hivesqlcontext.sql(insert into table partittioin by(date)....) . hivesqlcontext.sql(insert into table partittioin by(date)....) Question can be considered as an extension to :How to save DataFrame directly to Hive? any help is much appreciated. 4 Answers 4 I believe it works something like this: df...

How to execute pig script from java

Image
Clash Royale CLAN TAG #URR8PPP How to execute pig script from java How to execute pig script from java class. I have installed pig on linux system and my java application on windows system. Thanks 1 Answer 1 You have two options basically. 1) Execute spawn shell subprocess via Java API and handover Script to it. 2) Use Embedded pig Script. (I would prefer this one. as it gives good control over variables needed for operations.) By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Unable to create temp file for insert values in hive

Image
Clash Royale CLAN TAG #URR8PPP Unable to create temp file for insert values in hive I have installed hive 1.2 in a Linux server and started metastore successfully when I am inserting data in a table I am getting below error.Please suggest some solution. /oradata_iscsi/hive/bin>hive ls: cannot access /oradata_iscsi/spark/lib/spark-assembly-*.jar: No such file or directory Logging initialized using configuration in jar:file:/oradata_iscsi/hive/lib/hive-common-1.2.0.jar!/hive-log4j.properties hive> Insert into test values(1); FAILED: SemanticException [Error 10293]: Unable to create temp file for insert values File /tmp/hive/ora12c/6a9e3ee7-620f-476c-939c-64a49c6a0a7e/_tmp_space.db/Values__Tmp__Table__1/data_file could only be replicated to 0 nodes instead of minReplication (=1). There are 1 datanode(s) running and no node(s) are excluded in this operation. at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.chooseTarget4NewBlock(BlockManager.java:1559) at...

Sqoop - Import Job failed

Sqoop - Import Job failed I am trying to import a table of 32 Million records from SQL Server to Hive via Sqoop. The connection is SQL Server is successful. But Map/Reduce job does not successfully execute. It gives the following error: 18/07/19 04:00:11 INFO client.RMProxy: Connecting to ResourceManager at /127.0.0.1:8032 18/07/19 04:00:27 DEBUG db.DBConfiguration: Fetching password from job credentials store 18/07/19 04:00:27 INFO db.DBInputFormat: Using read commited transaction isolation 18/07/19 04:00:27 DEBUG db.DataDrivenDBInputFormat: Creating input split with lower bound '1=1' and upper bound '1=1' 18/07/19 04:00:28 INFO mapreduce.JobSubmitter: number of splits:1 18/07/19 04:00:29 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1531917395459_0002 18/07/19 04:00:30 INFO impl.YarnClientImpl: Submitted application application_1531917395459_0002 18/07/19 04:00:30 INFO mapreduce.Job: The url to track the job: http://quickstart.cloudera:8088/proxy/applica...