[tor-bugs] #22983 [Metrics/metrics-lib]: add a descriptor interface and implementation for web-logs
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Jul 20 16:38:40 UTC 2017
#22983: add a descriptor interface and implementation for web-logs
---------------------------------+------------------------------
Reporter: iwakeh | Owner: metrics-team
Type: enhancement | Status: new
Priority: Medium | Milestone:
Component: Metrics/metrics-lib | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
---------------------------------+------------------------------
Comment (by iwakeh):
To visualize comment:2, please see the following interface:
{{{
#!java
/* Copyright 2017 The Tor Project
* See LICENSE for licensing information */
package org.torproject.descriptor;
import java.util.List;
/**
* Interface for log-file descriptors.
*
* @since 2.1.0
*/
public interface LogDescriptor extends Descriptor {
/**
* Returns the hostname of the machine on which the logs were gathered.
*
* @since 2.1.0
*/
public String getMeasuringHost();
/**
* Returns the name of the host served and for which the logs were
gathered.
*
* @since 2.1.0
*/
public String getServedHost();
/**
* Returns the date of the log in yyymmdd format.
*
* @since 2.1.0
*/
public String getLogDate();
/**
* Return the raw descriptor bytes of the compressed sanitized logs.
*
* <p>The compression type is returned by {@link #getCompressionType()}
* and is one of 'gz' or 'xz'. Additional types might be added in
* future.</p>
*
* @since 2.1.0
*/
@Override
public byte[] getRawDescriptorBytes();
/**
* Returns the compression type as one of 'gz' or 'xz'.
*
* <p>Additional types might be added in future.</p>
*
* @since 2.1.0
*/
public byte[] getCompressionType();
/**
* Will always return an empty List as logs don't have any descriptors.
*
* @since 2.1.0
*/
@Override
public List<String> getAnnotations();
/**
* Will always return an empty List as logs don't have any descriptors.
*
* @since 2.1.0
*/
@Override
public List<String> getUnrecognizedLines();
}
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22983#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list