[
https://issues.apache.org/jira/browse/SDAP-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16528253#comment-16528253
]
ASF GitHub Bot commented on SDAP-118:
-------------------------------------
lewismc commented on a change in pull request #31: SDAP-118 create a new
ranking module
URL:
https://github.com/apache/incubator-sdap-mudrod/pull/31#discussion_r199279464
##########
File path:
ranking/src/main/java/org/apache/sdap/mudrod/ranking/ranksvm/SparkFormatter.java
##########
@@ -0,0 +1,55 @@
+package org.apache.sdap.mudrod.ranking.ranksvm;
+
+import java.io.*;
+import java.text.DecimalFormat;
+
+public class SparkFormatter {
+ DecimalFormat NDForm = new DecimalFormat("#.###");
+
+ public SparkFormatter() {
+ }
+
+ public void toSparkSVMformat(String inputCSVFileName, String
outputTXTFileName) {
+ File file = new File(outputTXTFileName);
+ if (file.exists()) {
+ file.delete();
+ }
+ try {
+ file.createNewFile();
+ FileWriter fw = new FileWriter(outputTXTFileName);
+ BufferedWriter bw = new BufferedWriter(fw);
+
+ BufferedReader br = new BufferedReader(new FileReader(inputCSVFileName));
Review comment:
Can ```br``` and ```bw``` cannot be used as a try-with-resources ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> create a ranking module
> -----------------------
>
> Key: SDAP-118
> URL: https://issues.apache.org/jira/browse/SDAP-118
> Project: Apache Science Data Analytics Platform
> Issue Type: Sub-task
> Components: mudrod
> Affects Versions: 1.0
> Reporter: Yun Li
> Assignee: Yun Li
> Priority: Major
> Fix For: 1.0
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)