Repository navigation
Expand file tree
/
Copy pathMain.java
More file actions
63 lines (46 loc) · 2.02 KB
/
Copy pathMain.java
File metadata and controls
63 lines (46 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import java.util.ArrayList;
import java.sql.*;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.util.stream.Stream;
import java.util.stream.Collectors;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Calendar;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.TimeUnit;
import org.apache.commons.collections4.MultiValuedMap;
import org.apache.commons.collections4.map.MultiValueMap;
import org.apache.commons.collections4.multimap.ArrayListValuedHashMap;
import java.io.IOException;
import java.sql.*;
import java.text.SimpleDateFormat;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws SQLException, InterruptedException, IOException {
// String myDriver = "com.mysql.cj.jdbc.Driver";
// String myUrl = "jdbc:mysql://localhost:3306/db";
// Class.forName(myDriver);
// Connection conn = DriverManager.getConnection(myUrl, "root", "password");
//
Scanner myObj = new Scanner(System.in);
System.out.println("Enter username:");
String userName = myObj.nextLine();
System.out.println("Username entered: " + userName);
System.out.println("Enter password for the DBMS");
String password = myObj.nextLine();
System.out.println("Password entered: " + password);
System.out.println("Enter name of schema(MD):");
String masterdata = myObj.nextLine();
System.out.println("MD schema name: " + masterdata);
Connection connection,dwh;
connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/"+masterdata, userName, password);
dwh= DriverManager.getConnection("jdbc:mysql://localhost:3306/dw_project", userName, password);
System.out.println("Connected to DBMS");
System.out.println("Executing MESHJOIN now ;)");
MeshJoin temp =new MeshJoin(connection,dwh,10,50);//#of iterations + stream size
temp.join();
}
}