Hi, I used this https://github.com/yukim/cassandra-bulkload-example/ (I have modified BulkLoad.java for my needs) for the sstable loader and it works ok. You can take a look, maybe it will help you.
Regards, Vanessa. On Mon, Mar 30, 2015 at 10:04 AM, Rahul Bhardwaj < rahul.bhard...@indiamart.com> wrote: > Hi Amila , > > I tried your code. In which we made some modification accordingly like: > > public class DataImportExample > { > static String filename; > > public static void main(String[] args) throws IOException > { > filename = "/root/perl_work/abc.csv"; > BufferedReader reader = new BufferedReader(new > FileReader(filename)); > String keyspace = "mesh_glusr"; > File directory = new File(keyspace); > if (!directory.exists()){ > directory.mkdir();} > > // random partitioner is created, u can give the partitioner as u > want > IPartitioner partitioner = new RandomPartitioner(); > > SSTableSimpleUnsortedWriter usersWriter = new > SSTableSimpleUnsortedWriter( > > directory,partitioner,keyspace,"test1",AsciiType.instance,null,64); > > > after compiling when we executed it with below command : > "java -cp /root/perl_work DataImportExample" > > it throws below error: > > Expecting URI in variable: [cassandra.config]. Please prefix the file > with file:/// for local files or file://<server>/ for remote files. > Aborting. > Fatal configuration error; unable to start. See log for stacktrace. > > We are not able to find what went wrong , actually not good java > developer, so plz guide. > > > Regards: > Rahul Bhardwaj > > On Fri, Mar 27, 2015 at 2:55 PM, Amila Paranawithana <amila1...@gmail.com> > wrote: > >> Hi, >> >> This post[1] may be useful. But note that this was done with cassandra >> older version. So there may be new way to do this. >> >> [1]. >> http://amilaparanawithana.blogspot.com/2012/06/bulk-loading-external-data-to-cassandra.html >> >> Thanks, >> >> >> On Fri, Mar 27, 2015 at 11:40 AM, Rahul Bhardwaj < >> rahul.bhard...@indiamart.com> wrote: >> >>> Hi All, >>> >>> Can we use sstable loader for loading external flat file or csv file. >>> If yes , kindly share the steps or manual. >>> >>> I need to put 40 million data into a table of around 70 columns >>> >>> >>> >>> Regards: >>> Rahul Bhardwaj >>> >>> >>> >>> >>> >>> Follow IndiaMART.com <http://www.indiamart.com> for latest updates on >>> this and more: <https://plus.google.com/+indiamart> >>> <https://www.facebook.com/IndiaMART> <https://twitter.com/IndiaMART> >>> Mobile Channel: >>> <https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=668561641&mt=8> >>> <https://play.google.com/store/apps/details?id=com.indiamart.m> >>> <http://m.indiamart.com/> >>> >>> <https://www.youtube.com/watch?v=DzORNbeSXN8&list=PL2o4J51MqpL0mbue6kzDa6eymLVUXtlR1&index=2> >>> Watch how IndiaMART Maximiser helped Mr. Khanna expand his business. >>> kyunki Kaam Yahin Banta Hai >>> <https://www.youtube.com/watch?v=Q9fZ5ILY3w8&feature=youtu.be>!!! >> >> >> >> >> -- >> >> *Amila Iroshani Paranawithana , **Senior Software Engineer* *, >> AdroitLogic <http://adroitlogic.org>* >> | ☎: +94779747398 >> | ✍: http://amilaparanawithana.blogspot.com >> [image: Facebook] <https://www.facebook.com/amila.paranawithana> [image: >> Twitter] <https://twitter.com/AmilaPara> [image: LinkedIn] >> <http://www.linkedin.com/profile/view?id=66289851&trk=tab_pro> [image: >> Skype] amila.paranawithana >> >> > > > > Follow IndiaMART.com <http://www.indiamart.com> for latest updates on > this and more: <https://plus.google.com/+indiamart> > <https://www.facebook.com/IndiaMART> <https://twitter.com/IndiaMART> > Mobile Channel: > <https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=668561641&mt=8> > <https://play.google.com/store/apps/details?id=com.indiamart.m> > <http://m.indiamart.com/> > > <https://www.youtube.com/watch?v=DzORNbeSXN8&list=PL2o4J51MqpL0mbue6kzDa6eymLVUXtlR1&index=2> > Watch how IndiaMART Maximiser helped Mr. Khanna expand his business. > kyunki Kaam Yahin Banta Hai > <https://www.youtube.com/watch?v=Q9fZ5ILY3w8&feature=youtu.be>!!! >