bwu-datagrid - реализация отложенной загрузки большого набора данных
Я работаю над реализацией отложенной загрузки с использованием реализации bwu-grid dataview в Dart. Мой сервер реализован с помощью Google App Engine (Java) через API cloudendpoint. При возврате более 1000+ строк, если не выбрана опция извлечения, я получаю исключение.
В настоящее время у меня есть нумерация страниц JQuery в нижней части окна просмотра данных. Я хочу реализовать отложенную загрузку с использованием курсора запросов jdo таким образом, чтобы при изменении страницы он загружал определенный сегмент набора данных.
Я просмотрел реализацию класса dataview и нашел следующий слушатель, который потенциально могу использовать:
async.Stream<core.PagingInfoChanged> get onBwuPagingInfoChanged =>
_eventBus.onEvent(core.Events.PAGING_INFO_CHANGED);
План реализации следующий:
- Запрос для 1-й страницы данных и общего количества строк, обновление сетки данных с общим количеством строк
- Прослушайте событие смены страницы
- Создайте конечную точку облака, используя курсор запроса, который возвращает сегмент данных
- Вставьте сегмент данных в сетку и обновите сетку данных
Как мой план реализации? Что еще я должен учитывать при реализации этого способа? Есть ли примеры, показывающие поддержку отложенной загрузки в bwu-datagrid? Мы ценим любые предложения.
W 12:06:21.550 com.google.appengine.api.datastore.BaseQueryResultsSource logChunkSizeWarning: This query does not have a chunk size set in FetchOptions and has returned over 1000 results. If result sets of this size are common for this query, consider setting a chunk size to improve performance.
To disable this warning set the following system property in appengine-web.xml (the value of the property doesn't matter): 'appengine.datastore.disableChunkSizeWarning'
E 12:07:19.760 com.google.api.server.spi.SystemService invokeServiceMethod: exception occurred while calling backed method
javax.jdo.JDODataStoreException: Datastore Failure
at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:421)
at org.datanucleus.api.jdo.JDOPersistenceManager.internalClose(JDOPersistenceManager.java:367)
at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.releasePersistenceManager(JDOPersistenceManagerFactory.java:1106)
at org.datanucleus.api.jdo.JDOPersistenceManager.close(JDOPersistenceManager.java:343)
at com.sports_tla.MLBMatchEndpoint.listMLBMatch(MLBMatchEndpoint.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:45)
at com.google.api.server.spi.SystemService.invokeServiceMethod(SystemService.java:359)
at com.google.api.server.spi.SystemServiceServlet.execute(SystemServiceServlet.java:160)
at com.google.api.server.spi.SystemServiceServlet.doPost(SystemServiceServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:437)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:444)
at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:220)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:308)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:300)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:441)
at java.lang.Thread.run(Thread.java:724)
NestedThrowablesStackTrace:
com.google.appengine.api.datastore.DatastoreFailureException: Unexpected failure
at com.google.appengine.api.datastore.FutureHelper.getInternal(FutureHelper.java:78)
at com.google.appengine.api.datastore.FutureHelper.quietGet(FutureHelper.java:62)
at com.google.appengine.api.datastore.DatastoreServiceImpl.get(DatastoreServiceImpl.java:41)
at com.google.appengine.datanucleus.WrappedDatastoreService.get(WrappedDatastoreService.java:60)
at com.google.appengine.datanucleus.FetchFieldManager.lookupOneToOneChild(FetchFieldManager.java:581)
at com.google.appengine.datanucleus.FetchFieldManager.fetchRelationField(FetchFieldManager.java:541)
at com.google.appengine.datanucleus.FetchFieldManager.fetchObjectField(FetchFieldManager.java:405)
at org.datanucleus.state.AbstractStateManager.replacingObjectField(AbstractStateManager.java:2353)
at com.sports_tla.MLBMatch.jdoReplaceField(MLBMatch.java)
at com.sports_tla.MLBMatch.jdoReplaceFields(MLBMatch.java)
at org.datanucleus.state.JDOStateManager.replaceFields(JDOStateManager.java:1935)
at org.datanucleus.state.JDOStateManager.replaceFields(JDOStateManager.java:1962)
at com.google.appengine.datanucleus.EntityUtils$1.fetchFields(EntityUtils.java:974)
at org.datanucleus.state.JDOStateManager.loadFieldValues(JDOStateManager.java:764)
at org.datanucleus.state.JDOStateManager.initialiseForHollow(JDOStateManager.java:205)
at org.datanucleus.state.StateManagerFactory.newForHollowPopulated(StateManagerFactory.java:89)
at org.datanucleus.state.ObjectProviderFactory.newForHollowPopulated(ObjectProviderFactory.java:75)
at org.datanucleus.ObjectManagerImpl.findObject(ObjectManagerImpl.java:2882)
at com.google.appengine.datanucleus.EntityUtils.entityToPojo(EntityUtils.java:1014)
at com.google.appengine.datanucleus.query.DatastoreQuery$2.apply(DatastoreQuery.java:229)
at com.google.appengine.datanucleus.query.DatastoreQuery$2.apply(DatastoreQuery.java:226)
at com.google.appengine.datanucleus.query.LazyResult.resolveNext(LazyResult.java:96)
at com.google.appengine.datanucleus.query.LazyResult.resolveAll(LazyResult.java:121)
at com.google.appengine.datanucleus.query.StreamingQueryResult.closingConnection(StreamingQueryResult.java:90)
at org.datanucleus.store.query.AbstractQueryResult.disconnect(AbstractQueryResult.java:108)
at com.google.appengine.datanucleus.query.StreamingQueryResult.disconnect(StreamingQueryResult.java:78)
at com.google.appengine.datanucleus.query.JDOQLQuery$1.managedConnectionPreClose(JDOQLQuery.java:199)
at com.google.appengine.datanucleus.DatastoreConnectionFactoryImpl$DatastoreManagedConnection.close(DatastoreConnectionFactoryImpl.java:147)
at org.datanucleus.store.connection.ConnectionManagerImpl.closeAllConnections(ConnectionManagerImpl.java:181)
at org.datanucleus.store.AbstractStoreManager$1.preClose(AbstractStoreManager.java:260)
at org.datanucleus.ObjectManagerImpl.close(ObjectManagerImpl.java:1112)
at org.datanucleus.api.jdo.JDOPersistenceManager.internalClose(JDOPersistenceManager.java:359)
at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.releasePersistenceManager(JDOPersistenceManagerFactory.java:1106)
at org.datanucleus.api.jdo.JDOPersistenceManager.close(JDOPersistenceManager.java:343)
at com.sports_tla.MLBMatchEndpoint.listMLBMatch(MLBMatchEndpoint.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:45)
at com.google.api.server.spi.SystemService.invokeServiceMethod(SystemService.java:359)
at com.google.api.server.spi.SystemServiceServlet.execute(SystemServiceServlet.java:160)
at com.google.api.server.spi.SystemServiceServlet.doPost(SystemServiceServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
<continued in next message>