Skip to content

Commit 39bf488

Browse files
committed
WIP - make it compile while we experiment
1 parent 2f96dfd commit 39bf488

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

‎java/samples/src/main/java/RocksFFMSample.java‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ public static void main(final String[] args) {
1515
System.exit(-1);
1616
}
1717

18-
createDB(args[0]);
18+
final RocksFFMSample sample = new RocksFFMSample();
19+
sample.createDB(args[0]);
1920
// createCF(args[0]);
2021

2122
//RocksFFM.wibble();
@@ -24,14 +25,16 @@ public static void main(final String[] args) {
2425

2526
private void createDB(String db_path) {
2627
try (final RocksDB db = RocksDB.open(db_path)) {
27-
db.put("key1", "value1");
28-
db.put("key2", "value2");
29-
db.put("key3", "somethingElseEntirely");
28+
db.put("key1".getBytes(), "value1".getBytes());
29+
db.put("key2".getBytes(), "value2".getBytes());
30+
db.put("key3".getBytes(), "somethingElseEntirely".getBytes());
31+
} catch (RocksDBException e) {
32+
throw new RuntimeException(e);
3033
}
3134
}
3235

3336
private void createCF(String db_path) {
34-
System.out.println("%s\n", NAME);
37+
System.out.printf("%s\n", NAME);
3538
try (final Options options = new Options().setCreateIfMissing(true);
3639
final RocksDB db = RocksDB.open(options, db_path)) {
3740
assert (db != null);
@@ -41,6 +44,8 @@ private void createCF(String db_path) {
4144
new ColumnFamilyDescriptor("new_cf".getBytes(), new ColumnFamilyOptions()))) {
4245
assert (columnFamilyHandle != null);
4346
}
47+
} catch (RocksDBException e) {
48+
throw new RuntimeException(e);
4449
}
4550
}
4651
}

‎java/src/main/java/org/rocksdb/ffm/RocksFFM.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class RocksFFM {
1818
}
1919

2020
public static void open() {
21-
c_h_2.rocksdb_open(MemorySegment options, MemorySegment name, MemorySegment errptr)
21+
// c_h_2.rocksdb_open(MemorySegment options, MemorySegment name, MemorySegment errptr);
2222
}
2323

2424
public static void wibble() {

0 commit comments

Comments
 (0)