ruffle1986 commented on issue #1575: METRON-2335: [UI] Implement synchronization between browser user state and Hbase user state URL: https://github.com/apache/metron/pull/1575#issuecomment-565408917 Good points, @sardell . 👍 This PR is focusing on the replacement of the services which means, instead of using the data source class and saving these user settings to local storage, let's just persist them in hdfs. I have just changed the service calls in the exact same places where they used to be called but with the previous service (data source) or where they were directly stored to local storage. So basically it's an issue on the level of the implementation of these features (like auto polling, show/hide, etc.) and not on the new service's level. So actually these components or services called the methods multiple times to persist the user settings to local storage but it was hardly noticeable but now it is noticeable, since we're performing actual http requests. So in my opinion, if it's suboptimal now, it was suboptimal before as well and I didn't want to optimise the features because it's already a big PR with lots of changes and I didn't want to increase the difficulty for the reviewer because, in my opinion, it's out of the scope of this issue. But it's true for sure, it's not nice. Even though there are multiple http calls unnecessarily and the server throws an error (it does because we're hitting hdfs frequently probably but not sure), it works fine. I'm open to introduce enhancements on the features` level in order to get rid of these problems. Would you like me to do it in this PR or it should be a separate Jira task with a separate PR? --- Just for the record, here's what's happening on the features` level: - When you open pane where you can change the rows per table or the refresh rate, the show/hide service persists the show/hide dismissed alerts and the show/hide resolved alerts when the component is initialised. (2 http calls) - When you change the refresh rate, auto-polling service and configure-table service persists their state (2 calls) - It's the same when you change the rows per page (2 calls) - When you switch the hide dismissed alerts, the configure-table service persists its state and the auto-polling service persists its state twice (3 calls) - The same goes for the hide resolved alerts switch (3 calls) - When you switch the "Convert timestamps to local time", it works fine (1 call) - When you open the table columns settings pane and click on the save button, the column-names service and the configure-table service persist their state (2 calls) I don't want to details the calls in the save-search module but you get the point. Also, as I said earlier, these changes are highly opinionated and radically changed the way how we handle user settings involving backend parts. So I'm really curious about @mmiklavc and @nickwallen 's opinion about this. And they might be able to explain the error message given by the server which is the following: ``` RestException: No lease on /user/metron/user-settings (inode 16861): File does not exist. [Lease. Holder: DFSClient_NONMAPREDUCE_-955476593_1, pendingcreates: 1]↵ at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkLease(FSNamesystem.java:3697)↵ at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.analyzeFileState(FSNamesystem.java:3498)↵ at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getNewBlockTargets(FSNamesystem.java:3336)↵ at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:3296)↵ at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.addBlock(NameNodeRpcServer.java:850)↵ at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.addBlock(ClientNamenodeProtocolServerSideTranslatorPB.java:504)↵ at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)↵ at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:640)↵ at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982)↵ at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2351)↵ at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2347)↵ at java.security.AccessController.doPrivileged(Native Method)↵ at javax.security.auth.Subject.doAs(Subject.java:422)↵ at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1869)↵ at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2347)↵ ``` cc @tiborm
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
