Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storm-rdbms RDBMSDumperBolt doesn´t works in cluster mode #26

Open
adocortes opened this issue Mar 21, 2013 · 0 comments
Open

storm-rdbms RDBMSDumperBolt doesn´t works in cluster mode #26

adocortes opened this issue Mar 21, 2013 · 0 comments

Comments

@adocortes
Copy link

RDBMSDumperBolt doesnt works in cluster mode.

The constructor code must be moved to the prepare method, leaving only the initialization of variables in the constructor.

It worked for me this way:

// Constructor after changes
public RDBMSDumperBolt(String primaryKey, String tableName, ArrayList columnNames,
ArrayList columnTypes, String dBUrl, String username, String password) throws SQLException {
super();
this.primaryKey = primaryKey;
this.tableName = tableName;
this.columnNames = columnNames;
this.columnTypes = columnTypes;
this.dBUrl = dBUrl;
this.username = username;
this.password = password;
}

// Prepare after changes
@OverRide
public void prepare(Map stormConf, TopologyContext context) {
try {
con = connector.getConnection(dBUrl, username, password);
} catch (Exception e) {
e.printStackTrace();
}
communicator = new RDBMSCommunicator(con, primaryKey, tableName, columnNames, columnTypes);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant