GitHub user shenh062326 opened a pull request:

    https://github.com/apache/spark/pull/14574

    [SPARK-16985] Change dataFormat from yyyyMMddHHmm to yyyyMMddHHmmss

    ## What changes were proposed in this pull request?
    
    In our cluster, sometimes the sql output maybe overrided. When I submit 
some sql, all insert into the same table, and the sql will cost less one 
minute, here is the detail,
    1 sql1, 11:03 insert into table.
    2 sql2, 11:04:11 insert into table.
    3 sql3, 11:04:48 insert into table.
    4 sql4, 11:05 insert into table.
    5 sql5, 11:06 insert into table.
    The sql3's output file will override the sql2's output file. here is the 
log:
    ```
    16/05/04 11:04:11 INFO hive.SparkHiveHadoopWriter: 
XXfinalPath=hdfs://tl-sng-gdt-nn-tdw.tencent-distribute.com:54310/tmp/assorz/tdw-tdwadmin/20160504/04559505496526517_-1_1204544348/10000/_tmp.p_20160428/attempt_201605041104_0001_m_000000_1
    
    16/05/04 11:04:48 INFO hive.SparkHiveHadoopWriter: 
XXfinalPath=hdfs://tl-sng-gdt-nn-tdw.tencent-distribute.com:54310/tmp/assorz/tdw-tdwadmin/20160504/04559505496526517_-1_212180468/10000/_tmp.p_20160428/attempt_201605041104_0001_m_000000_1
    
    ```
    
    The reason is the output file use SimpleDateFormat("yyyyMMddHHmm"), if two 
sql insert into the same table in the same minute, the output will be overrite. 
I think we should change dateFormat to "yyyyMMddHHmmss", in our cluster, we 
can't finished a sql in one second.
    
    
    ## How was this patch tested?
    
    (Please explain how this patch was tested. E.g. unit tests, integration 
tests, manual tests)
    
    
    (If this patch involves UI changes, please attach a screenshot; otherwise, 
remove this)
    
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/shenh062326/spark SPARK-16985

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/14574.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #14574
    
----
commit a385a2ac2a659d153532bef0748a0b1134687c8b
Author: hongshen <shenh062...@126.com>
Date:   2016-08-10T03:57:56Z

    Change dataFormat from yyyyMMddHHmm to yyyyMMddHHmmss

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to