Closed hsg77 closed 4 years ago
I'm guessing there is no data that exists in that table for that data adapter. If you're certain thats not the case please let us know. For example, try the same thing replacing "delete" with "query" hbase_datastore.query(queryOptions, eQuery);
and find out if there are any results in the iterator.
Regardless, I think this still should be handled more gracefully which we will fix.
I'm sure this layer has data. I also changed the delete method to query method, and after testing, it also has data, as shown in the code below:
hbase_datastore.delete(queryOptions, eQuery);
// changed to
CloseableIterator
while (iterator.hasNext()) { SimpleFeature feature = iterator.next();
System.out.println(feature.getAttribute("TFBH"));
Geometry geometry = (Geometry) feature.getDefaultGeometry();
GeoJsonWriter gjW = new GeoJsonWriter();
String out_geo_str = gjW.write(geometry);
System.out.println(out_geo_str);
}
The output is H48H064059 {"type":"MultiPolygon","coordinates":[[[[103.84375,30.66694444],[103.84375,30.66666667],[103.84361111,30.66666667],[103.84333333,30.66666667],[103.84305556,30.66666667],[103.84375,30.67222222],[103.84375,30.67194444],[103.84375,30.67166667],[103.84375,30.67138889],[103.84375,30.67111111],[103.84375,30.67083333],[103.84375,30.67055555],[103.84375,30.67027778],[103.84375,30.67],[103.84375,30.66972222],[103.84375,30.66944444],[103.84375,30.66916667],[103.84375,30.66888889],[103.84375,30.66861111],[103.84375,30.66833333],[103.84375,30.66805555],[103.84375,30.66777778],[103.84375,30.6675],[103.84375,30.66722222],[103.84375,30.66694444]]]],"crs":{"type":"name","properties":{"name":"EPSG:0"}}} H48H063059 {"type":"MultiPolygon","coordinates":[[[[103.84375,30.68777778],[103.84375,30.6875],[103.84361111,30.6875],[103.84333333,30.6875],[103.84305556,30.6875],[103.84277778,30.6875],[103.8425,30.6875],[103.84222222,30.6875],[103.84194444,30.6875],[103.84166667,30.6875],[103.84375,30.69222222],[103.84375,30.69194444],[103.84375,30.69166667],[103.84375,30.69138889],[103.84375,30.69111111],[103.84375,30.69083333],[103.84375,30.69055555],[103.84375,30.69027778],[103.84375,30.69],[103.84375,30.68972222],[103.84375,30.68944444],[103.84375,30.68916667],[103.84375,30.68888889],[103.84375,30.68861111],[103.84375,30.68833333],[103.84375,30.68805555],[103.84375,30.68777778]]]],"crs":{"type":"name","properties":{"name":"EPSG:0"}}}
The GeoServer layer displays the results as follows
Layer information is displayed in HBase web management as follows:
@rfecher It seems to be an error in calling this method(this.deleteEntries) report: if (query instanceof EverythingQuery) { this.deleteEntries(adapter, index, queryOptions.getAuthorizations()); } The following branch is fine to execute
This issue seems to have been resolved with #1685. The deleteAll method in HBaseOperations was using the incorrect column family name for the adapter. This fix will be included in the upcoming 1.1 release.
in geowave0.9.8 version My calling code is as follows: public void deleteFeatures(String gwNamespace,String tableName) throws Exception { HBaseOperations hbase= this.gw.getNewHBaseOperations(this.gwNamespace); HBaseDataStore hbase_datastore = new HBaseDataStore(hbase,new HBaseOptions()); InternalDataAdapter<?> da=this.gw.GetInternalDataAdapter(this.gwNamespace,this.tableName); //FeatureDataAdapter da=this.gw.GetFeatureAdapter(this.gwNamespace,this.tableName); //set current tablename QueryOptions queryOptions=new QueryOptions(); queryOptions.setAdapter(da);
// EverythingQuery eQuery=new EverythingQuery(); hbase_datastore.delete(queryOptions, eQuery); // System.out.println("after execute,"+this.tableName); }
I haven't found the reason. What may be the situation? This code sets setAdaptero as FeatureDataAdapter and executes OK under geowave 0.9.7; Under 0.9.8, both Feature Data Adapter and Internal Data Adapter have the following error messages
An error message when I call Delete Layer Data is as follows:
`4 一月 14:25:38 WARN [operations.HBaseOperations] - Unable to close deleter java.lang.RuntimeException: org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException: org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException: Column family � does not exist in region draw_tk_out_SPATIAL_IDX,,1547201824330.b58e6fe636495d1ef26edb7decafcbf3. in table 'draw_tk_out_SPATIAL_IDX', {TABLE_ATTRIBUTES => {coprocessor$1 => '|mil.nga.giat.geowave.datastore.hbase.coprocessors.AggregationEndpoint|1073741823|'}, {NAME => '2AY', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'NONE', TTL => 'FOREVER', COMPRESSION => 'NONE', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'} at org.apache.hadoop.hbase.regionserver.HRegion.checkFamily(HRegion.java:8298) at org.apache.hadoop.hbase.regionserver.HRegion.getScanner(HRegion.java:2779) at org.apache.hadoop.hbase.regionserver.HRegion.getScanner(HRegion.java:2764) at org.apache.hadoop.hbase.regionserver.HRegion.getScanner(HRegion.java:2758) at org.apache.hadoop.hbase.regionserver.RSRpcServices.newRegionScanner(RSRpcServices.java:2693) at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:2996) at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:36613) at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2354) at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:124) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:297) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:277)
`