MCPcopy Create free account
hub / github.com/CDSecLab/MJXT / main

Method main

src/test/java/Table_Gen_Lmax.java:41–87  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

39 }
40
41 public static void main(String[] args) {
42 BufferedWriter buffWriter = null;
43 try {
44 File csvFile = new File("data/" + table_name + "/" + table_name+ "_k" + key_colnum
45 + "_j" + join_column + "_" + record_num + condition +".csv");
46 FileWriter writer = new FileWriter(csvFile, false);
47 buffWriter = new BufferedWriter(writer, 1024);
48 String title = "id";
49 for (int i = 0; i < key_colnum; i++) {
50 title += ",keyword" + i;
51 }
52 for (int i = 0; i < join_column; i++) {
53 title += ",join-attr" + i;
54 }
55 buffWriter.write(title + "\n");
56
57 int counter = 0;
58 //int[] L_max = new int[]{100, 200, 300, 400, 500, 600, 700, 800, 900, 1000};
59 counter = write_Lmax(buffWriter, 1000, Lmax, counter);
60 System.out.println(counter);
61 for (int i = counter; i < record_num; i++) {
62 String csv = table_name + "_id_" + counter;
63 for (int j = 0; j < key_colnum; j++) {
64 csv += "," + table_name +"_keyword_" + counter + "_" + j;
65 }
66 for (int j = 0; j < join_column; j++) {
67 csv += "," + "join_" + counter + "_" + j;
68 }
69 counter++;
70 buffWriter.write(csv);
71 buffWriter.newLine();
72 buffWriter.flush();
73 }
74
75 } catch (Exception e) {
76 System.out.println("Exception of writing into csv.");
77 e.printStackTrace();
78 } finally {
79 try {
80 if (buffWriter != null) {
81 buffWriter.close();
82 }
83 } catch (IOException e) {
84 e.printStackTrace();
85 }
86 }
87 }
88}

Callers

nothing calls this directly

Calls 1

write_LmaxMethod · 0.95

Tested by

no test coverage detected