Skip to content

Conversation

@liujiawinds
Copy link
Contributor

What changes were proposed in this pull request?

Add stream parameter constructor for PhysicalFsWriter.

Why are the changes needed?

PhysicalFsWriter implementation works on the basis of a Path, but Flink's bulk writer based on stream.
In order to integrate with flink more elegantly, I think a constructor with stream parameter should be added to PhysicalFsWriter

How was this patch tested?

It won't change behavior of PhysicalFsWriter and passed all existed test cases.

@github-actions github-actions bot added the JAVA label Jun 10, 2022
@liujiawinds
Copy link
Contributor Author

@dongjoon-hyun Could you help me to approve this pr?

@dongjoon-hyun
Copy link
Member

Thank you for making a PR, @liujiawinds . Sure, I clicked Approve to run.

}
}

public PhysicalFsWriter(FileSystem fs,
Copy link
Member

@dongjoon-hyun dongjoon-hyun Jun 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this before the original constructor.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Path path,
OrcFile.WriterOptions opts,
WriterEncryptionVariant[] encryption
) throws IOException {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dongjoon-hyun
Copy link
Member

It seems that zlib library build fails in C++ module. This is irrelevant to your PR.

CMake Error at zlib_ep-stamp/zlib_ep-download-RELWITHDEBINFO.cmake:49 (message):
  Command failed: 1
   '/usr/local/bin/cmake' '-Dmake=' '-Dconfig=' '-P' '/home/runner/work/orc/orc/build/zlib_ep-prefix/src/zlib_ep-stamp/zlib_ep-download-RELWITHDEBINFO-impl.cmake'

@dongjoon-hyun
Copy link
Member

Also cc @williamhyun because this is for Apache Flink integration.

@liujiawinds
Copy link
Contributor Author

@dongjoon-hyun Do I need to do something about the C++ module error?

@dongjoon-hyun
Copy link
Member

No~ Not at all. I can merge your PR after manual review and testing.

@dongjoon-hyun
Copy link
Member

It's rerunning now.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM (Pending CIs)

@dongjoon-hyun dongjoon-hyun added this to the 1.7.5 milestone Jun 10, 2022
@dongjoon-hyun
Copy link
Member

To help Apache Flink community use Apache ORC more easier, I strategically set the milestone v1.7.5 for this additional constructor patch.

@dongjoon-hyun dongjoon-hyun changed the title ORC-1198: Add stream parameter constructor for PhysicalFsWriter ORC-1198: Add a new PhysicalFsWriter with FSDataOutputStream parameter Jun 10, 2022
@dongjoon-hyun dongjoon-hyun changed the title ORC-1198: Add a new PhysicalFsWriter with FSDataOutputStream parameter ORC-1198: Add a new PhysicalFsWriter constructor with FSDataOutputStream parameter Jun 10, 2022
dongjoon-hyun pushed a commit that referenced this pull request Jun 10, 2022
…Stream` parameter

### What changes were proposed in this pull request?
Add stream parameter constructor for PhysicalFsWriter.

### Why are the changes needed?
PhysicalFsWriter implementation works on the basis of a Path, but Flink's bulk writer based on stream.
In order to integrate with flink more elegantly,  I think a constructor with stream parameter should be added to PhysicalFsWriter

### How was this patch tested?
It won't change behavior of PhysicalFsWriter and passed all existed test cases.

Closes #1153 from liujiawinds/main.

Authored-by: Jia Liu <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 0565bfe)
Signed-off-by: Dongjoon Hyun <[email protected]>
dongjoon-hyun pushed a commit that referenced this pull request Jun 10, 2022
…Stream` parameter

### What changes were proposed in this pull request?
Add stream parameter constructor for PhysicalFsWriter.

### Why are the changes needed?
PhysicalFsWriter implementation works on the basis of a Path, but Flink's bulk writer based on stream.
In order to integrate with flink more elegantly,  I think a constructor with stream parameter should be added to PhysicalFsWriter

### How was this patch tested?
It won't change behavior of PhysicalFsWriter and passed all existed test cases.

Closes #1153 from liujiawinds/main.

Authored-by: Jia Liu <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 0565bfe)
Signed-off-by: Dongjoon Hyun <[email protected]>
@dongjoon-hyun
Copy link
Member

Merged to main/1.8/1.7. Welcome to the Apache ORC community, @liujiawinds .
I assigned ORC-1198 to you (sonice_lj).

cxzl25 pushed a commit to cxzl25/orc that referenced this pull request Jan 11, 2024
…Stream` parameter

### What changes were proposed in this pull request?
Add stream parameter constructor for PhysicalFsWriter.

### Why are the changes needed?
PhysicalFsWriter implementation works on the basis of a Path, but Flink's bulk writer based on stream.
In order to integrate with flink more elegantly,  I think a constructor with stream parameter should be added to PhysicalFsWriter

### How was this patch tested?
It won't change behavior of PhysicalFsWriter and passed all existed test cases.

Closes apache#1153 from liujiawinds/main.

Authored-by: Jia Liu <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants