Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Why my file size get increase while storing it into azure data ?

Highlighted

Why my file size get increase while storing it into azure data ?

New Contributor

I have created my own custom processor where I internally passing all the credentials and ingesting data into azure data lake.

Here are the following code snippets that I am using in my custom processor to storing any kind of data into it.

ByteArrayOutputStream bos = new ByteArrayOutputStream(); byte[] buf = new byte[1024]; try { for (int readNum; (readNum = is.read(buf)) != -1;) { bos.write(buf, 0, readNum); //no doubt here is 0 //Writes len bytes from the specified byte array starting at offset off to this byte array output stream. System.out.println("read " + readNum + " bytes,"); } } catch (IOException ex) { } byte[] bytes = bos.toByteArray(); String files = path + "/" +"lasPDFTEST.LAS"; OutputStream stream = client.createFile(files, IfExists.OVERWRITE);
stream.write(bytes);
stream.close();