AWS EC2 Instance Experience with HANA

Move my code to AWS EC2 instance with HANA database... Only 100euro left for testing and keep running all day long took over 20 euros for the instance.

Before running on the server, it takes so long time to run the program on my laptop. Definitely, the HANA database by using column table can improve scan and select records:)

First to run Java programs in a Linux environment, and some takeaways are:


Keep running after ending the terminal session:
  • nohup java -Xmx16G -cp ../lib/*:./ io.github.parklize.viewer.TableViewer

Export the table and import to MySQL back:
  • 01. CMD LINE MySQL: 

LOAD DATA LOCAL INFILE '/Users/guangyuan/Downloads/data.csv' INTO TABLE RESIM.LOD_RANDOMRECORDSIM FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'(ID, USERID, ARTISTURI, @LDSDSIM, @VSMCOSINESIM, @RESIMSIM) SET LDSDSIM = NULLIF(@LDSDSIM,''), VSMCOSINESIM = NULLIF(@VSMCOSINESIM,''), RESIMSIM = NULLIF(@RESIMSIM,'') ;

  • 02. MODIFY USERID AND ARTISTURI BY USING SQL

UPDATE resim.LOD_RANDOMRECORDSIM SET USERID = substring(USERID,2,length(USERID)-2)
UPDATE resim.LOD_RANDOMRECORDSIM SET ARTISTURI = substring(ARTISTURI,2,length(ARTISTURI)-2)

No comments:

Post a Comment