Member since
05-05-2017
33
Posts
1
Kudos Received
0
Solutions
07-05-2017
11:25 PM
Hi, i can ssh to all hosts passwordless. i checked all hosts, ambari-agents are runing fine. /etc/ambari-agent/conf/agent.ini are pointting to the correct server. but still not working
... View more
07-05-2017
10:34 PM
Yes, the succeeded one is the one run as the server. Could you tell me how to route to the server? Many thanks,
... View more
07-05-2017
09:37 PM
Hi ALL, I installed Ambari on Amazon EC2 with three virtual machines. ubuntu16.4 I followed the guide from: https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.1.0/bk_ambari-installation/content/download_the_ambari_repo_ubuntu16.html But, I got the following error: I cam confirm that: Ambari-agents are running on all hosts. /etc/ambari-agent/conf/ambari-agent.ini are correct. ssh working fine. I don't know I missed?
... View more
Labels:
- Labels:
-
Apache Ambari
07-01-2017
10:35 AM
Hi, I am using spring boot jdbc template connecting to a phoenix hbase database. However, i have a table with 100 columns. so, everytime when i insert a row should contain 100 values For example insert: public void insert(Ttsnihl m){
Object[] params = new Object[]{
m.getPATIENT_ID(),
m.getRECORD_DATE(),
m.getSTART_TIME(),
m.getEND_TIME(),
.....// 100 object array
};
jdbcTemplate.update(insertSql, params);
}
And: public void insertBatch(final List<Ttsnihl> ts){
BatchPreparedStatementSetter bpss = new BatchPreparedStatementSetter() {
@Override
public void setValues(PreparedStatement ps, int i) throws SQLException {
Ttsnihl t=ts.get(i);
ps.setString(1, t.getPATIENT_ID());
ps.setTimestamp(2, t.getRECORD_DATE());
ps.setTimestamp(3, t.getSTART_TIME());
ps.setTimestamp(4, t.getEND_TIME());
..... // 100 ps.set()functions
}
@Override
public int getBatchSize() {
return ts.size();
}
};
jdbcTemplate.batchUpdate(insertSql, bpss);
}
I want to ask, is there any smart way to do this? Many thanks in advance!
... View more
Labels:
- Labels:
-
Apache Phoenix
06-30-2017
09:40 AM
Hi, Many Thanks. May i also ask, Long[] is already an array object why do i still need to call createArrayOf function ?
... View more
06-30-2017
09:36 AM
Many thanks, I just realised i need to convert long[] to Long[]
... View more
06-29-2017
05:25 PM
Hi, I am using jdbctemplate connecting to an apache phoenix database, but i had a problem which the database has a record store an array(long[]). In the database, the column is defined as "USER_ROUTES BIGINT[] NULL", In java, i use the long[] instead. How to insert an array as a variable in the PreparedStatement For example: BatchPreparedStatementSetter bpss = new BatchPreparedStatementSetter() { @Override public void setValues(PreparedStatement ps, int i) throws SQLException { EnviData ed=eds.get(i); ps.setString(1, ed.getPATIENT_ID()); ps.setInt(2, ed.getMOBILE_ID()); ps.setArray(3, ed.getUSER_ROUTES()); } } The Function getUSER_ROUTES() will return an long[]. but, the program shows error. How to solve it?
... View more
Labels:
- Labels:
-
Apache Phoenix
06-22-2017
05:36 PM
Thanks for your information. I just have a look of the Phoenix ORM PHO, but I don't understand it very clearly. Could you make an example for me? For example, let says we have an entity class class Person{ int id; int name; int age; int sex; } And a RestController to accept a http post request. how could I use the PHO to receive the data and insert into Phoenix? Thank you very much for your help Bin Ye
... View more
06-22-2017
11:23 AM
I am currently trying to build spring boot rest API to insert data into Apache Phoenix. If I can use JPA to insert data into Phoenix that will be very convenient.
... View more
Labels:
- Labels:
-
Apache Phoenix
- « Previous
-
- 1
- 2
- Next »