Uh oh!
There was an error while loading. Please reload this page.
[SPARK-24093][DStream][Minor]Make some fields of KafkaStreamWriter/In… - #21455
Hidden character warning
[SPARK-24093][DStream][Minor]Make some fields of KafkaStreamWriter/In…#21455merlintang wants to merge 1 commit into
Conversation
…ternalRowMicroBatchWriter visible to outside of the classes
merlintang
commented
May 29, 2018
@jerryshao can you review this minor update ? |
jerryshao
commented
May 31, 2018
Simply making these fields publicly accessible seems a little weird from Spark's side. Maybe we can use reflection instead. |
AmplabJenkins
commented
Jun 9, 2018
Can one of the admins verify this patch? |
merlintang
commented
Jun 11, 2018
@jerryshao Actually, we can not use reflection to get this field information. |
gaborgsomogyi
commented
Jun 26, 2018
Why is it required at all? Making things visible without proper reason is not a good idea. |
merlintang
commented
Jun 26, 2018
via email
@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>
.
|
gaborgsomogyi
commented
Jun 29, 2018
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 classA(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);
} |
HeartSaVioR
commented
Dec 14, 2018
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. |
Closesapache#17422Closesapache#17619Closesapache#18034Closesapache#18229Closesapache#18268Closesapache#17973Closesapache#18125Closesapache#18918Closesapache#19274Closesapache#19456Closesapache#19510Closesapache#19420Closesapache#20090Closesapache#20177Closesapache#20304Closesapache#20319Closesapache#20543Closesapache#20437Closesapache#21261Closesapache#21726Closesapache#14653Closesapache#13143Closesapache#17894Closesapache#19758Closesapache#12951Closesapache#17092Closesapache#21240Closesapache#16910Closesapache#12904Closesapache#21731Closesapache#21095 Added: Closesapache#19233Closesapache#20100Closesapache#21453Closesapache#21455Closesapache#18477 Added: Closesapache#21812Closesapache#21787 Author: hyukjinkwon <gurwls223@apache.org> Closesapache#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