> On June 29, 2017, 12:56 a.m., Vamsee Yarlagadda wrote: > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryMetrics.java > > Lines 295 (patched) > > <https://reviews.apache.org/r/60490/diff/2/?file=1766739#file1766739line295> > > > > Does it keep overwriting the existing /tmp/sentry-metrics.json file or > > keep appending data to this single file? > > Vamsee Yarlagadda wrote: > Read your previous comment and realized it keeps creating a new file. If > that is the case, if CM doesn't read the file within the interval then are > the metrics lost during this time? > > Alexander Kolbasov wrote: > It writes a new content every time > > Alexander Kolbasov wrote: > The metrics are cumulative. CM reads some snapshot. The rename guarantees > that CM would not read half-written file.
But if CM is slow, then there is a possibility that it might rather see it as a discrete numbers than continuous. I guess if Hive is already following that, then i guess it doesn't hurt to follow the same way. - Vamsee ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/60490/#review179213 ----------------------------------------------------------- On June 29, 2017, 12:34 a.m., Alexander Kolbasov wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/60490/ > ----------------------------------------------------------- > > (Updated June 29, 2017, 12:34 a.m.) > > > Review request for sentry, Brian Towles, kalyan kumar kalvagadda, Na Li, > Sergio Pena, and Vamsee Yarlagadda. > > > Bugs: SENTRY-1820 > https://issues.apache.org/jira/browse/SENTRY-1820 > > > Repository: sentry > > > Description > ------- > > SENTRY-1820: Add JSON file reporter for Sentry metrics > > > Diffs > ----- > > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryMetrics.java > e3691a96ef1142fdae74ba873683a025265cc006 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryServiceUtil.java > 215f7d5eada4ad7d3c7eec9c36e350d7e9b3632d > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java > 4f4816790a87c0136885123ec44fc1eccb43d4b1 > > > Diff: https://reviews.apache.org/r/60490/diff/2/ > > > Testing > ------- > > > Thanks, > > Alexander Kolbasov > >
