hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Clampffer (JIRA)" <j...@apache.org>
Subject [jira] [Reopened] (HDFS-9328) Formalize coding standards for libhdfs++
Date Fri, 22 Apr 2016 13:40:13 GMT

     [ https://issues.apache.org/jira/browse/HDFS-9328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

James Clampffer reopened HDFS-9328:

Reopening this for a couple reasons

1) Nobody is using clang-format; mostly because it causes tons of whitespace issues when merging.
It also seems to apply arbitrary indentation rules to lambdas which renders them unreadable
(cant tell where the capture list ends and arguments begin).

2) The strict "no exceptions ever" rule isn't reasonable; it's even more strict than Google's
rules about exceptions. They say you can catch if a lib says something might throw.  Asio
and the URI parsing library like to throw exceptions that we need to catch.  We have a lot
of code that isn't exception safe (though that's been improving a lot lately: HDFS-9712 and
similar refactors). Letting an exception bubble out to a c++ caller is going to drop things
on the floor as the stack unwinds.  C++ was designed to safely manage resources in systems
level software and exceptions are an integral part of that.  I'm not saying we should start
throwing exceptions everywhere but pretending they don't exist isn't a solution either.  Had
we been using an async library that didn't throw it would be possible to do without them.

> Formalize coding standards for libhdfs++
> ----------------------------------------
>                 Key: HDFS-9328
>                 URL: https://issues.apache.org/jira/browse/HDFS-9328
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>            Reporter: James Clampffer
>            Assignee: James Clampffer
>            Priority: Blocker
>             Fix For: HDFS-8707
>         Attachments: HDFS-9328.HDFS-8707.000.patch, HDFS-9328.HDFS-8707.001.patch, HDFS-9328.HDFS-8707.002.patch,
HDFS-9328.HDFS-8707.003.patch, HDFS-9328.HDFS-8707.004.patch
> We have 2-3 people working on this project full time and hopefully more people will start
contributing.  In order to efficiently scale we need a single, easy to find, place where developers
can check to make sure they are following the coding standards of this project to both save
their time and save the time of people doing code reviews.
> The most practical place to do this seems like a README file in libhdfspp/. 
> The foundation of the standards is google's C++ guide found here: https://google-styleguide.googlecode.com/svn/trunk/cppguide.html
> Any exceptions to google's standards or additional restrictions need to be explicitly
enumerated so there is one single point of reference for all libhdfs++ code standards.

This message was sent by Atlassian JIRA

View raw message