Here you can find the source of formatTimestampEnd(String timestamp)
Parameter | Description |
---|---|
timestamp | is the timestamp to be formated |
public static String formatTimestampEnd(String timestamp)
//package com.java2s; //License from project: Apache License public class Main { /**/*from w ww .j a v a2s. c o m*/ * Formats a string timestamp to be used as the end bound filter string in * HBase scan. Adds 1 ms to it and makes it 13 digits * * @param timestamp * is the timestamp to be formated * @return a formated string to be used in HBase scan */ public static String formatTimestampEnd(String timestamp) { if (timestamp == null || timestamp == "") return timestamp; timestamp = String.format("%013d", Long.parseLong(timestamp) + 1); return timestamp; } }