Skip to content

Commit

Permalink
Replace @returns with @return
Browse files Browse the repository at this point in the history
  • Loading branch information
velvia committed Oct 14, 2015
1 parent 6f6f2db commit a35fa02
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ extends CachedMergingColumnStore with StrictLogging {
* params:
* splits_per_node - how much parallelism or ways to divide a token range on each node
*
* @returns each split will have token_start, token_end, replicas filled in
* @return each split will have token_start, token_end, replicas filled in
*/
def getScanSplits(dataset: TableName,
params: Map[String, String] = Map.empty): Seq[Map[String, String]] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ with FiloCassandraConnector {

/**
* Retrieves a whole series of chunk maps, in the range [startSegmentId, untilSegmentId)
* @returns ChunkMaps(...), if nothing found will return ChunkMaps(Nil).
* @return ChunkMaps(...), if nothing found will return ChunkMaps(Nil).
*/
def getChunkMaps(partition: String,
version: Int,
Expand All @@ -77,7 +77,7 @@ with FiloCassandraConnector {

/**
* Writes a new chunk map to the chunkRowTable.
* @returns Success, or an exception as a Future.failure
* @return Success, or an exception as a Future.failure
*/
def writeChunkMap(partition: String,
version: Int,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ object NodeCoordinatorActor {
* @defaultPartitionKey if Some(key), a null value in partitioning column will cause key to be used.
* if None, then NullPartitionValue will be thrown when null value
* is encountered in a partitioning column.
* @returns BadSchema if the partition column is unsupported, sort column invalid, etc.
* @return BadSchema if the partition column is unsupported, sort column invalid, etc.
*/
case class SetupIngestion(dataset: String,
schema: Seq[String],
Expand All @@ -60,7 +60,7 @@ object NodeCoordinatorActor {
* The partitioning column and sort column are set up in the dataset.
*
* @param seqNo the sequence number to be returned for acknowledging the entire set of rows
* @returns Ack(seqNo) returned when the set of rows has been committed to the MemTable.
* @return Ack(seqNo) returned when the set of rows has been committed to the MemTable.
*/
case class IngestRows(dataset: String, version: Int, rows: Seq[RowReader], seqNo: Long)

Expand All @@ -69,7 +69,7 @@ object NodeCoordinatorActor {
/**
* Initiates a flush of the remaining MemTable rows of the given dataset and version.
* Usually used when at the end of ingesting some large blob of data.
* @returns Flushed when the flush cycle has finished successfully, commiting data to columnstore.
* @return Flushed when the flush cycle has finished successfully, commiting data to columnstore.
*/
case class Flush(dataset: String, version: Int)
case object Flushed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ trait ChunkMergingStrategy {
* Merges an existing segment cached using readSegmentForCache with a new partial segment to be inserted.
* @param oldSegment the existing segment from the cache, populated using readSegmentForCache
* @param newSegment the new partial segment containing only new data/rows to be inserted
* @returns a merged Segment ready to be flushed to disk. This typically will only include chunks that need
* @return a merged Segment ready to be flushed to disk. This typically will only include chunks that need
* to be updated or written to disk.
*/
def mergeSegments[K: TypedFieldExtractor: SortKeyHelper](oldSegment: Segment[K],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ trait ChunkRowMap {
/**
* Serializes the data in the row index. NOTE: The primary keys are not serialized, since it is
* assumed they exist in a different column.
* @returns two binary Filo vectors, first one for the chunkIds, and second one for the rowNums.
* @return two binary Filo vectors, first one for the chunkIds, and second one for the rowNums.
*/
def serialize(): (ByteBuffer, ByteBuffer)
}
Expand Down
14 changes: 7 additions & 7 deletions core/src/main/scala/filodb.core/columnstore/ColumnStore.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ trait ColumnStore {
* preserved such that the chunk/row# in the ChunkRowMap can be read out in sort key order.
* @param segment the partial Segment to write / merge to the columnar store
* @param version the version # to write the segment to
* @returns Success. Future.failure(exception) otherwise.
* @return Success. Future.failure(exception) otherwise.
*/
def appendSegment[K: SortKeyHelper: TypedFieldExtractor](projection: RichProjection,
segment: Segment[K],
Expand All @@ -51,7 +51,7 @@ trait ColumnStore {
* in each row
* @param keyRange describes the partition and range of keys to read back. NOTE: end range is exclusive!
* @param version the version # to read from
* @returns An iterator over RowReaderSegment's
* @return An iterator over RowReaderSegment's
*/
def readSegments[K: SortKeyHelper](columns: Seq[Column], keyRange: KeyRange[K], version: Int):
Future[Iterator[Segment[K]]]
Expand All @@ -72,7 +72,7 @@ trait ColumnStore {
/**
* Determines how to split the scanning of a dataset across a columnstore.
* @param params implementation-specific flags to affect the scanning, including parallelism, locality etc
* @returns individual param maps for each split, to be fed to parallel/distributed scanSegments calls
* @return individual param maps for each split, to be fed to parallel/distributed scanSegments calls
*/
def getScanSplits(dataset: TableName,
params: Map[String, String] = Map.empty): Seq[Map[String, String]]
Expand Down Expand Up @@ -114,7 +114,7 @@ trait CachedMergingColumnStore extends ColumnStore with StrictLogging {
/**
* Writes chunks to underlying storage.
* @param chunks an Iterator over triples of (columnName, chunkId, chunk bytes)
* @returns Success. Future.failure(exception) otherwise.
* @return Success. Future.failure(exception) otherwise.
*/
def writeChunks(dataset: TableName,
partition: PartitionKey,
Expand All @@ -135,7 +135,7 @@ trait CachedMergingColumnStore extends ColumnStore with StrictLogging {
* @param columns the columns to read back chunks from
* @param keyRange the range of segments to read from. Note endExclusive flag.
* @param version the version to read back
* @returns a sequence of ChunkedData, each triple is (segmentId, chunkId, bytes) for each chunk
* @return a sequence of ChunkedData, each triple is (segmentId, chunkId, bytes) for each chunk
* must be sorted in order of increasing segmentId
*/
def readChunks[K](columns: Set[ColumnId],
Expand All @@ -146,7 +146,7 @@ trait CachedMergingColumnStore extends ColumnStore with StrictLogging {
* Reads back all the ChunkRowMaps from multiple segments in a keyRange.
* @param keyRange the range of segments to read from, note [start, end) <-- end is exclusive!
* @param version the version to read back
* @returns a sequence of (segmentId, ChunkRowMap)'s
* @return a sequence of (segmentId, ChunkRowMap)'s
*/
def readChunkRowMaps[K](keyRange: KeyRange[K], version: Int): Future[Seq[(SegmentId, BinaryChunkRowMap)]]

Expand All @@ -157,7 +157,7 @@ trait CachedMergingColumnStore extends ColumnStore with StrictLogging {
* of many segments, such as reading all the data for one node from a Spark worker.
* TODO: how to make passing stuff such as token ranges nicer, but still generic?
*
* @returns an iterator over ChunkRowMaps. Must be sorted by partitionkey first, then segment Id.
* @return an iterator over ChunkRowMaps. Must be sorted by partitionkey first, then segment Id.
*/
def scanChunkRowMaps(dataset: TableName,
version: Int,
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/scala/filodb.core/metadata/MetaStore.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,21 @@ trait MetaStore {
/**
* Creates a new dataset with the given name, if it doesn't already exist.
* @param dataset the Dataset to create. Should have superprojection defined.
* @returns Success, or AlreadyExists, or StorageEngineException
* @return Success, or AlreadyExists, or StorageEngineException
*/
def newDataset(dataset: Dataset): Future[Response]

/**
* Retrieves a Dataset object of the given name
* @param name Name of the dataset to retrieve
* @returns a Dataset
* @return a Dataset
*/
def getDataset(name: String): Future[Dataset]

/**
* Deletes dataset metadata including all projections. Does not delete column store data.
* @param name Name of the dataset to delete.
* @returns Success, or MetadataException, or StorageEngineException
* @return Success, or MetadataException, or StorageEngineException
*/
def deleteDataset(name: String): Future[Response]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ trait FlushPolicy {
/**
* Determine the next dataset and version to flush using some heuristic.
* Should ignore currently flushing datasets (ie Locked memtable is nonempty)
* @returns None if it is not time to flush yet, or all datasets are already being flushed.
* @return None if it is not time to flush yet, or all datasets are already being flushed.
* Some((dataset, version)) for the next flushing candidate.
*/
def nextFlush(memtable: MemTable): Option[(TableName, Int)]
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/scala/filodb.core/reprojector/MemTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ trait MemTable extends StrictLogging {
* @defaultPartitionKey if Some(key), a null value in partitioning column will cause key to be used.
* if None, then NullPartitionValue will be thrown when null value
* is encountered in a partitioning column.
* @returns BadSchema if cannot determine a partitioningFunc or sort column
* @return BadSchema if cannot determine a partitioningFunc or sort column
* AlreadySetup if the dataset has been setup before
*/
def setupIngestion(dataset: Dataset,
Expand Down Expand Up @@ -130,7 +130,7 @@ trait MemTable extends StrictLogging {
* @param dataset the Dataset to ingest. Must have been setup using setupIngestion().
* @param version the version to ingest into.
* @param rows the rows to ingest
* @returns Ingested or PleaseWait, if the MemTable is too full or we are low on memory
* @return Ingested or PleaseWait, if the MemTable is too full or we are low on memory
*/
def ingestRows(dataset: TableName, version: Int, rows: Seq[RowReader]): IngestionResponse = {
import Column.ColumnType._
Expand Down Expand Up @@ -203,7 +203,7 @@ trait MemTable extends StrictLogging {
* Flips the active and locked buffers. After this is called, ingestion will immediately
* proceed to the new active buffer, and the existing active buffer becomes the new Locked
* buffer.
* @returns NotEmpty if the locked buffer is not empty
* @return NotEmpty if the locked buffer is not empty
*/
def flipBuffers(dataset: TableName, version: Int): FlipResponse

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ trait Reprojector {
* to do work asynchronously. Also, scheduling too many futures leads to long blocking time and
* memory issues.
*
* @returns a Future[Seq[String]], representing info from individual segment flushes.
* @return a Future[Seq[String]], representing info from individual segment flushes.
*/
def newTask(memTable: MemTable, dataset: Types.TableName, version: Int): Future[Seq[String]] = {
import Column.ColumnType._
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/scala/filodb.core/reprojector/Scheduler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class Scheduler(memTable: MemTable,
/**
* Initiates a flush cycle manually for a given dataset and version.
* This might be called by an ingestion source when it is done with the ingestion, for example.
* @returns Flushed, or NoAvailableTasks if there are no slots available to start a flush.
* @return Flushed, or NoAvailableTasks if there are no slots available to start a flush.
*/
def flush(dataset: TableName, version: Int): FlushResponse = {
if (tasks contains (dataset -> version)) return Flushed
Expand All @@ -122,7 +122,7 @@ class Scheduler(memTable: MemTable,

/**
* Returns a Future for any outstanding reprojection tasks for a given dataset
* @returns Future[Nil] if there are no reprojection tasks for given dataset/version
* @return Future[Nil] if there are no reprojection tasks for given dataset/version
* Future[Nil] for a reprojection task that errors out
* Future[Seq[String]] for a reprojection task that finishes normally
*/
Expand All @@ -138,7 +138,7 @@ class Scheduler(memTable: MemTable,

/**
* Same as waitForReprojection but acts on all versions of a given dataset
* @returns a Seq of (version, Seq[String]) pairs
* @return a Seq of (version, Seq[String]) pairs
*/
def waitForReprojection(dataset: TableName)
(implicit ec: ExecutionContext): Future[Seq[(Int, Seq[String])]] = {
Expand Down

0 comments on commit a35fa02

Please sign in to comment.