locationtech / geowave

GeoWave provides geospatial and temporal indexing on top of Accumulo, HBase, BigTable, Cassandra, Kudu, Redis, RocksDB, and DynamoDB.
Apache License 2.0
502 stars 190 forks source link

A problem of deleting layer data: NoSuchColumn Family Exception: Column family does not exist in region #1482

Closed hsg77 closed 4 years ago

hsg77 commented 5 years ago

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)

at org.apache.hadoop.hbase.client.AbstractClientScanner$1.hasNext(AbstractClientScanner.java:95)
at mil.nga.giat.geowave.datastore.hbase.operations.HBaseOperations.deleteAll(HBaseOperations.java:564)
at mil.nga.giat.geowave.core.store.base.BaseDataStore.deleteEntries(BaseDataStore.java:587)
at mil.nga.giat.geowave.core.store.base.BaseDataStore.delete(BaseDataStore.java:440)
at com.sapsoft.gwLayerClass.deleteFeatures(gwLayerClass.java:209)
at com.sapsoft.controller.geowaveController.deleteFeatures(geowaveController.java:888)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:208)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

`

rfecher commented 5 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.

hsg77 commented 5 years ago

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 iterator=hbase_datastore.query(queryOptions, eQuery);

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"}}}

hsg77 commented 5 years ago

The GeoServer layer displays the results as follows

image

hsg77 commented 5 years ago

Layer information is displayed in HBase web management as follows: image

hsg77 commented 5 years ago

@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

jdgarrett commented 4 years ago

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.