[jira] [Updated] (SPARK-3288) All fields in TaskMetrics should be private and use getters/setters
[ https://issues.apache.org/jira/browse/SPARK-3288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Wendell updated SPARK-3288: --- Assignee: Ilya Ganelin (was: Dale Richardson) > All fields in TaskMetrics should be private and use getters/setters > --- > > Key: SPARK-3288 > URL: https://issues.apache.org/jira/browse/SPARK-3288 > Project: Spark > Issue Type: Improvement > Components: Spark Core >Affects Versions: 1.1.0 >Reporter: Patrick Wendell >Assignee: Ilya Ganelin > Labels: starter > Fix For: 1.3.0 > > > This is particularly bad because we expose this as a developer API. > Technically a library could create a TaskMetrics object and then change the > values inside of it and pass it onto someone else. It can be written pretty > compactly like below: > {code} > /** >* Number of bytes written for the shuffle by this task >*/ > @volatile private var _shuffleBytesWritten: Long = _ > def incrementShuffleBytesWritten(value: Long) = _shuffleBytesWritten += > value > def decrementShuffleBytesWritten(value: Long) = _shuffleBytesWritten -= > value > def shuffleBytesWritten = _shuffleBytesWritten > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Updated] (SPARK-3288) All fields in TaskMetrics should be private and use getters/setters
[ https://issues.apache.org/jira/browse/SPARK-3288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Wendell updated SPARK-3288: --- Labels: starter (was: ) > All fields in TaskMetrics should be private and use getters/setters > --- > > Key: SPARK-3288 > URL: https://issues.apache.org/jira/browse/SPARK-3288 > Project: Spark > Issue Type: Improvement > Components: Spark Core >Affects Versions: 1.1.0 >Reporter: Patrick Wendell > Labels: starter > > This is particularly bad because we expose this as a developer API. > Technically a library could create a TaskMetrics object and then change the > values inside of it and pass it onto someone else. It can be written pretty > compactly like below: > {code} > /** >* Number of bytes written for the shuffle by this task >*/ > @volatile private var _shuffleBytesWritten: Long = _ > def incrementShuffleBytesWritten(value: Long) = _shuffleBytesWritten += > value > def decrementShuffleBytesWritten(value: Long) = _shuffleBytesWritten -= > value > def shuffleBytesWritten = _shuffleBytesWritten > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Updated] (SPARK-3288) All fields in TaskMetrics should be private and use getters/setters
[ https://issues.apache.org/jira/browse/SPARK-3288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Wendell updated SPARK-3288: --- Assignee: (was: Andrew Or) > All fields in TaskMetrics should be private and use getters/setters > --- > > Key: SPARK-3288 > URL: https://issues.apache.org/jira/browse/SPARK-3288 > Project: Spark > Issue Type: Improvement > Components: Spark Core >Affects Versions: 1.1.0 >Reporter: Patrick Wendell > Labels: starter > > This is particularly bad because we expose this as a developer API. > Technically a library could create a TaskMetrics object and then change the > values inside of it and pass it onto someone else. It can be written pretty > compactly like below: > {code} > /** >* Number of bytes written for the shuffle by this task >*/ > @volatile private var _shuffleBytesWritten: Long = _ > def incrementShuffleBytesWritten(value: Long) = _shuffleBytesWritten += > value > def decrementShuffleBytesWritten(value: Long) = _shuffleBytesWritten -= > value > def shuffleBytesWritten = _shuffleBytesWritten > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Updated] (SPARK-3288) All fields in TaskMetrics should be private and use getters/setters
[ https://issues.apache.org/jira/browse/SPARK-3288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Or updated SPARK-3288: - Affects Version/s: 1.1.0 > All fields in TaskMetrics should be private and use getters/setters > --- > > Key: SPARK-3288 > URL: https://issues.apache.org/jira/browse/SPARK-3288 > Project: Spark > Issue Type: Improvement > Components: Spark Core >Affects Versions: 1.1.0 >Reporter: Patrick Wendell >Assignee: Andrew Or > > This is particularly bad because we expose this as a developer API. > Technically a library could create a TaskMetrics object and then change the > values inside of it and pass it onto someone else. It can be written pretty > compactly like below: > {code} > /** >* Number of bytes written for the shuffle by this task >*/ > @volatile private var _shuffleBytesWritten: Long = _ > def incrementShuffleBytesWritten(value: Long) = _shuffleBytesWritten += > value > def decrementShuffleBytesWritten(value: Long) = _shuffleBytesWritten -= > value > def shuffleBytesWritten = _shuffleBytesWritten > {code} -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org