-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-24093][DStream][Minor]Make some fields of KafkaStreamWriter/In… #21455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The head ref may contain hidden characters: "\u201CSpark-24093\u201D"
Conversation
…ternalRowMicroBatchWriter visible to outside of the classes
|
@jerryshao can you review this minor update ? |
|
Simply making these fields publicly accessible seems a little weird from Spark's side. Maybe we can use reflection instead. |
|
Can one of the admins verify this patch? |
|
@jerryshao Actually, we can not use reflection to get this field information. |
|
Why is it required at all? Making things visible without proper reason is not a good idea. |
|
@gabor. These fields are important for us the understand the spark kafka
streaming data like the topic name. we can use these information to track
the system status.
…On Tue, Jun 26, 2018 at 4:52 AM Gabor Somogyi ***@***.***> wrote:
Why is it required at all? Making things visible without proper reason is
not a good idea.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#21455 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABXY-RAJjzhNWzKkXIaFGViMpWFEB0hEks5uAiBlgaJpZM4USHvN>
.
|
|
Sounds weird. The topic names are available when the streaming app submitted. Why this can't be reused? Second option is reflection as jerryshao suggested. |
|
BTW, fields in class constructors is not visible without class A(fieldA: String) { }generates: $ javap -private A.class
Compiled from "A.scala"
public class A {
public A(java.lang.String);
}FYI, when $ javap -private A.class
Compiled from "A.scala"
public class A {
private final java.lang.String fieldA;
public java.lang.String fieldA();
public A(java.lang.String);
} |
|
Yeah, that's what also I found interestingly on Scala. Constructor parameters can be used like fields in class but they're not exposed as fields, even private accessor. For case class we can pick up values in constructor parameters but it doesn't work with normal class. |
Closes apache#17422 Closes apache#17619 Closes apache#18034 Closes apache#18229 Closes apache#18268 Closes apache#17973 Closes apache#18125 Closes apache#18918 Closes apache#19274 Closes apache#19456 Closes apache#19510 Closes apache#19420 Closes apache#20090 Closes apache#20177 Closes apache#20304 Closes apache#20319 Closes apache#20543 Closes apache#20437 Closes apache#21261 Closes apache#21726 Closes apache#14653 Closes apache#13143 Closes apache#17894 Closes apache#19758 Closes apache#12951 Closes apache#17092 Closes apache#21240 Closes apache#16910 Closes apache#12904 Closes apache#21731 Closes apache#21095 Added: Closes apache#19233 Closes apache#20100 Closes apache#21453 Closes apache#21455 Closes apache#18477 Added: Closes apache#21812 Closes apache#21787 Author: hyukjinkwon <[email protected]> Closes apache#21781 from HyukjinKwon/closing-prs.
…ternalRowMicroBatchWriter visible to outside of the classes
What changes were proposed in this pull request?
This PR is created to make relevant fields of KafkaStreamWriter and InternalRowMicroBatchWriter visible to outside of the classes.
How was this patch tested?
manual tests